Blank Page with Bad Request on it After Adding Bundle to Cart


This error message occurs when the code to output the bundle widget is within the product page form.

Move the code outside of the form to fix the issue by following these steps:

  1. From Shopify's admin, select Online Store.

    select online store

  2. Select Actions.


  3. Select Edit code.

    Edit code

  4. Under "Templates", select product.liquid.

    Note: If your theme contains sections, this code may be found within "Sections", in the product-template.liquid file.

    select product.liquid

  5. Look within the form tags for this code:

    {% unless bundle_loaded == 'true' %}
     {% include 'shappify-bdl-load-bundle' %}
     {% assign bundle_loaded = 'true' %}
    {% endunless %}
  6. Add this code where you would like the product bundle to display on the product page:

    Note: This code cannot be within the form tags. We recommend adding it either after the </form> tag or just before the code that outputs the related products. If you can't find the </form> tag in the product.liquid file, check the snippets folder for a product-form.liquid or short-form.liquid file and look for the code in there.

    {% unless bundle_loaded == 'true' %}
     {% include 'shappify-bdl-load-bundle' %}
     {% assign bundle_loaded = 'true' %}
    {% endunless %}

    add this code

  7. Select Save.

    select save

That's it!

Blog Posts:

1 out of 2 found this helpful



Please sign in to leave a comment.