[Bug Fix] Incorrect variants added to cart (Galleria versions 3.2.0 and 3.3.0)

If you are using Galleria version 3.2.0 or 3.3.0, there is a bug that occurs intermittently when adding variants to the cart.  In some instances, you may see the wrong variant being added.  We are working on a formal fix for this, but if you are experiencing this issue and would like to fix it right away, please follow these steps:

If you're using Galleria 3.3.0

Note: this error only occurs if you have the Dynamic Checkout button disabled on your store.

  • From your Shopify dashboard, look for the Sales Channels heading on the left, then click Online Store > Themes and look for Galleria
  • Click the ... button and then Duplicate to create a backup of your theme (this is an optional, precautionary step that we always suggest when editing code on your theme)
  • Then, on your original Galleria theme, click the ... button, then Edit Code from the drop-down menu
  • Navigate to the Assets folder and click to open the files called product-form.js
  • On line 73, look for this code:

this.$buyButton.toggleAttribute('hidden', isHiddenAddBtn);

  • Replace just this one line with this code:

this.$buyButton.toggleAttribute('hidden', isHiddenAddBtn);

if(this.$buyButton){

this.$buyButton.toggleAttribute('hidden', isHiddenAddBtn);

}

  • Save the file and the issue should be resolved

If you're using Galleria 3.2.0

  • From your Shopify dashboard, look for the Sales Channels heading on the left, then click Online Store > Themes and look for Galleria
  • Click the ... button and then Duplicate to create a backup of your theme (this is an optional, precautionary step that we always suggest when editing code on your theme)
  • Then, on your original Galleria theme, click the ... button, then Edit Code from the drop-down menu
  • Navigate to the Snippets folder and click to open the files called product-form.liquid 
  • Around line 19, look for this code:

<div data-variant-id=“{{ current_variant.id }}“>

  • Replace it with this code:

<div data-content data-variant-id=“{{ current_variant.id }}“>

  • Save the file and the issue should be resolved

We apologize for any inconvenience this has caused. If you are uncomfortable with making those code changes yourself, please reach out to us and we'd be happy to request access to your store and make the adjustments for you.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us