Product page not perfoming well, Debut theme

Solved
Satso
New Member
2 0 0

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.

 

0 Likes
tim
Shopify Expert
2865 119 942

This is an accepted solution.

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.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
Satso
New Member
2 0 0

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

0 Likes