fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Plugin resets chosen attributes

Hi!

We’ve got a problem with your plugin. The plugin is resetting chosen attributes after the product has loaded, it looks like it’s JavaScript who clears all chosen attributes (the “buy-button” is visible in a brief moment but then disappears).
Is there any way we can turn this feature off or is there any hook we can use do disable this feature?

Direct link to product: https://beredd.se/butik/skor/scholl-sprinter-score-dam/

Best regards,

Hakik Zaman

Hi Ludivine,

Thanks for reaching out to us. We have closed the duplicate ticket you created. Let’s continue here.

I have visited the link but after visiting this the chosen attributes are still selected from my side.

Please check this screencast, I have recorded my screen during the tests: https://www.loom.com/share/0072044275814c5e9a410e87e9c2f1e9

Thank You

I just clicked on the link I sent you, and THEN it works as it should.

If you go to our website and search for this product however (or any other product with variants), it is broken. I don’t understand why the issue does not come up when clicking on a link.

Hakik Zaman

Hi Ludivine,

It seems like a caching issue. Please try your site using browsers in incognito/private mode or clear all the caches like- browser cache, caching plugin cache, and server-side cache. Then check again.

Thank You

Hi,

I have tested in incognito, and the variants are not pre-selected at all.

I should add that the code works fine on our development server, and that we have already tested to clear all the cache.

Our developer tried quite a few things before I contacted you 🙂

Hi Hakik,

The issue does not appear if you use the link. Please go to beredd.se by typing the address in your browser, not by clicking any link.

From there you can type poco plus in the search bar, and the product we looked at earlier will appear. Alternatively, you can check any product which has swatches as they all have the same issue.

Thanks 🙂

Hakik Zaman

Hi Ludivine,

Can you please temporarily deactivate our Swatches plugin and check whether the options are selected without our plugin or not?

Hope to hear from you soon.

Thank You

Hi,

I can unfortunately not do that unless it’s the middle of the night, I have too many users on the site.

Moreover, the pre-selection of variants which we have coded is made to function with the plugin. This means that it will surely not work if we deactivate the plugin.

1- Were you able to recreate the issue if you did not go through the link?

2- Back to my original question: Is there any way we can turn the override off or is there any hook we can use do disable this feature?

Hakik Zaman

Hi Ludivine,

The default selection is a basic behavior of WooCommerce: https://paste.pics/NY2FM

Please check it by disabling our Swatches plugin. You can use a staging site to perform the tests.

If you want we can also give you a staging site.

1- Were you able to recreate the issue if you did not go through the link?

No, I couldn’t replicate your issue in our local environment.

Thank You

Hello,

We are not talking about the same thing here, I must have been unclear.

I am not talking about the pre-selection of variants that comes with Woocommerce as default. We have coded a special solution so we always pre-select a variant that it in stock. This is the function that is being overridden by the plugin. Our code kicks in, the buy button appears for a split second. Then the code somehow runs a second time, “unclicking” the variant that was just clicked.

I don’t really understand how you did not see the issue, as all of us at the office could, as well as several of our clients who called in.

Nonetheless, we can close this ticket as our developer managed to fix it.

Have a nice day!

Hakik Zaman

Hi Ludivine,

Glad to know your developer managed to fix it.

It is out of our support scope when you change the default behavior of WooCommerce by adding any custom code.

If it is a plugin from WordPress.org/Themeforest I can send it to our development team for compatibility.

Every day we get many requests regarding the user’s custom solution. It is difficult to maintain to take each request for our development team.

If you cleared it at the beginning of the conversation I could inform this in the first place.

Thank You