Site Builder Studio


Developers Blog

Resources, tips, and solutions we hope other devs will find when needed.

In Laravel you can batch queries so each only executes if they all do

In Laravel, transactions are handled using the DB facade, which provides a simple interface for beginning, committing, and rolling back transactions. The beginTransaction method is used to start a transaction, and the commit method is used to commit the transaction. If an error occurs during the transaction, the rollBack method can be used to roll […]

April 9, 2023

ShipStation API

We had some difficulty with the authorization as the examples/docs on shipstation site aren’t quite clear. Finally got it to work! I’m posting this working example api call to create an order on shipstation api in case it helps other devs in the future. Replace YOUR_API_KEY and YOUR_API_SECRET with yours.

April 7, 2023

Setting Form Action in jQuery AJAX

In a jQuery AJAX call, we set the the url to which the AJAX will pass the data. Here are three options. 1 > HTML action Use the action url coded into the HTML form we’re processing: 2 > Relative URL in the jQuery If the code is always going to live in the same […]

November 24, 2020

Form submission with AJAX

To submit a form by AJAX, ie using javascript with php to process a html form, use something like the code below. Note that we’re using the ‘on’ click event, so that even if the div that contains the trigger gets refreshed the function will still be bound. In this example, the form-handler file is […]

November 24, 2020

Clear form inputs with jQuery

jQuery doesn’t have function for clearing forms, but there is a way. With this method you can clear form inputs with jQuery by re-loading the form. When the jQuery loads the content div into the container div, the file myform.php will essentially be refreshed and the form inputs will be cleared. This has been a […]

November 23, 2020