Skip to content
Advertisement

Bigcommerce cart 422: Missing required fields error

I’m using Laravel to consume the Bigcommerce V3 API. I have ben able to succesfully create a new cart. But when trying to add an item to it, I keep getting a 422: Missing required fields error. I’m making my request trough Guzzle like this: The product I’m trying to add has no options or modifiers, so I don’t understand

Getting a substr of a {{ var }} in php

I am populating a HTML table: This yields: 61 event 40012345 substr( 40012345, 0, 24) 60 event 4001234 substr( event has a very long description. The list should show a 25 char substring., 0, 24) Thanks…Dan’l Answer Reorganize your html/php: You can also use Laravel Helpers for string related variables. Read docs here.

How to preserve formatting and protect the code from scripts

I am trying to find a way to escape the scripts or tags inserted to my database and at the same time preserve the text formatting. However I bumped into several problems that only solved either of the two. I’m trying to do it in $blog[‘title’] and $blog[‘content’] I tried using nl2br() to preseve the formatting. It works on preserving

Advertisement