Skip Navigation

[Resolved] Woocommerce fields: variable, qty. getting populated after clicking add to cart

This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 12 replies, has 2 voices.

Last updated by davidJ-4 6 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#542212
Products   Unique Flavors  LLC.jpg

I am trying to:
Thanks to views >wordpress archives, I could add the variable field and the quantity field to the shop page so the customers could order products directly from there. And it is working great.

My issue comes from when after clicking the "add to cart" button, the fields for variable options (pack options) and quantity for each product become populated by the previous selection.
If I select 12 pack for a quantity of 10 for one product, this selection of the fields will populate every other products on the shop page after adding the product to the cart.

I don't know if you can help me but I would appreciate very much if you could share your thoughts on stopping the fields from being populated.

Here is a link where you can try to order and see what happens;
hidden link

Thanks

I visited this URL:

I expected to see:

Instead, I got:

#542559

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Thank you for contacting our support forum.

I was able to clearly see the issue.

Would you mind if I took a further look at this one by logging into your website backend ?

The private fields will be enabled for your next response so that you can securely provide me with the credentials.

Thanks,
Shane

#542560

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Private fields

#543036

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Thank you for the credentials.

I tried to test this issue on a fresh install but was not able to replicate it. Would you mind trying to see if this could because of a conflict?

What I would like for you to do is to temporarily disable all your non-toolset plugins and try again?

Looking forward to hearing from you soon.

Thanks,
Shane

#543207

I disabled all the non-toolset plugin and only kept woocommerce on. I also changed the theme. But the issue is still there.

#543623

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

Would you mind if I took a duplicator package from your site for further testing ?

Thanks,
Shane

#543629

I don't mind, you can take a duplicator package of the site. Thanks

#544480

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

I managed to grab the duplicator package however in trying to replicate this issue on a fresh install I wasn't

Could you try recreating this entire archive from scratch and let me know if the problem still occurs?

Thanks,
Shane

#545393

I recreated the product archives and the issue is still there. I have also tried to use the code below but didn't work. Any idea?

$(".TextID").attr("autocomplete", "off");
#545691

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

I tried coming up with a little workaround to help you with this since i'm not able to reproduce it on a fresh install.

jQuery(document).ready(function(){
   jQuery('.value select').prop('selectedIndex',0);
   jQuery('.qty').val(1);
});

Add that to the js editor of your archive.

It should reset the values after the page refreshes.

Thanks,
Shane

#545844

Hi Shane,

Thank you so much for the code. It totally did the trick but now the price is still showing. Any idea or code about how to make it reset to not show after refreshing?

Thank you.

#546266

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi David,

I added this to the code as well and it should now be working correctly.

 jQuery(".price").css("display","none");

Please let me know if this helps.

Thanks,
Shane

#546309

It works! I really appreciate all your help with fixing this issue. Thank you so much.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.