How to hide certain varaints swatch button while click anotherswatch button
-
For example, I have a category swatch button with variants such as Single, Double, and King, each with different available sizes. I want to hide certain size buttons when the Single variant button is clicked, as the available sizes vary for each category
how to do that please suggest some ways by scripting not working
Attachments:
You must be
logged in to view attached files.
How do I hide certain variant swatch buttons when another swatch button is clicked
Hello,
Try to use the disabled swatch style, Navigate to Products > Attributes > edit attribute > Choose the disabled swatch.
So, you need to have the variant of the Product not checked with the Enable option on it and then the Disabled Swatch style will work accordingly.
See these images for reference:
https://snipboard.io/BMehIF.jpg
https://snipboard.io/NbOzfP.jpg
Let me know if you need further help!
Best Regards,
I tried, but it’s not hiding or disabling the button
it shows a alert message like “Sorry, no products matched your selection. Please choose a different combination.”
I want to hide unavailable variants, but while inspecting, the button still has the same class.
Attachments:
You must be
logged in to view attached files.
am selected disabled style for the size button but its not working
Hello,
The disabled swatch style does not hide unavailable variations but rather disables them, preventing selection.
If the disabled swatch style is not working share the wp login details so I can check and give you a possible solution.
Best Regards,
Hello,
Your issue has been resolved. I have increased the “AJAX variation threshold” option in Theme Settings > Shop > Variable products: https://prnt.sc/x_BOGCelUZQ7. Check back on your site and check the issue.
Best Regards,