Product page not perfoming well, Debut theme

Hi. My product page is not performing well.

Everytime I choose a variant, it takes me directly to the cart. Its annoying because after choosing the variant the customer should upload a picture and this makes it makes it impossible for them.

Other than that, I use the Uploadery App so the customer can upload a picture and everytime I select one pic, the page refreshes loosing the picture. I have uninstalled and reinstalled the app but the problem persist.

Anyone knows how to solve it? Website: www.illustrate-life.com . Try both actions please.

Thank you in advance.

The problem is in this code in your theme.js asset:

function currencyFormSubmit(event) {
    event.target.form.submit();
  }
  document.querySelectorAll('.shopify-currency-form select').forEach(function() {
    this.addEventListener('change', currencyFormSubmit);
  });

Change it to this:

function currencyFormSubmit(event) {
    event.target.form.submit();
  }
  document.querySelectorAll('.shopify-currency-form select').forEach(function( el ) {
    el.addEventListener('change', currencyFormSubmit);
  });

Your code was attaching event listener to wrong elements.

1 Like

Wow man, so fast and so simple. Thank you very much!