Clear the Box Builder Form Once Complete

To clear the Box Builder form once complete, you must add a snippet of code to your theme.liquid file.

First, find the number assigned to your Box Builder by going to Apps –> Giftship –> Box Builders –> Your Box –> and then finding the unique number in your proxy URL. In the below example, the number is 25.

Now go to your theme files by going to Online Store –> Themes –> Your Theme –> Actions –> Edit Code.

Now go to your theme.liquid file.

Above the closing <body> tag, implement this snippet. Instead of ’25’, use your unique number:

{%- if template == "cart" -%}
  <script>
    localStorage.removeItem('gsBuilderItems_25');
  </script>
{%- endif -%}

Now after an item is built through the builder and added to cart, the form will clear itself.

Can't find the answer in our documentation?
Contact Support