Always show Add-to-cart button / Always force a selection for variations
-
Hello,
I was searching the whole day to find a way how to get the add-to-cart button always shown for variable products, even if no option is selected. I couldnt find a solution altough this seems to be a very popular question.So I tought maybe it would be easier to fix this issue as followed:
1. I set a default selection so that there is a preselected variation on page load and this makes the add-to-cart-button to show up (this is possible via the product edit page).
2. And here is the challenge: I have to edit the code (no idea which code and how) so that there must always be one variation selected. My options are not displayed in the default dropdown menu but via images (purchased a plugin therefore). So I just want to disable the possibility to deselect an option at all.Example: my options for the attribute “color” are “red” and “blue”. The default selection is “red”, so this is shown when the customer opens the page. Now the customer can switch between red and blue, but is unable to deselect both.
Any ideas how to do that?
Many many thanks in advance for any help!!
- The topic ‘Always show Add-to-cart button / Always force a selection for variations’ is closed to new replies.