I have to make the options mandatory based on other options selected, for example how do I make 2nd option mandatory ONLY if Option 1 is selected in opencart 3?
For instance,
Option 1 (required) - Personalization --> Yes or No.
If Yes, then
Option 2 (Enter Name) is required
Otherwise, Option 2 is not required.
Right now, for Option 2 (enter name), I must declare this field required or not when I set it up.
Thanks.
This is usually called chained or dependant options. You can search the marketplace
https://www.opencart.com/index.php?rout ... %20options
There is free version for OC2, I have not tested it and it will require some editing.
https://www.opencart.com/index.php?rout ... n_id=13967
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
https://www.opencart.com/index.php?rout ... %20options
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
At the moment for example I have:
Choose colors:
- red
- black
- greem
If is red choose your materials:
- cotton
- textile
If is black choose your materials:
- silk
- wool
So, I need is to make Silk and Wool mandatory (required options) only if you select black colors.
Can you have some ideeas?
I have installed a dependant options extension and it does exactly what you want and should ..
If you choose one of the main options .. which are optional .. the sub options of that option become required
There are instances where the main option is required also .. but never that the sub option is required if the main option is not selected.
1. Contact the extension developer and ask them how to set this up correctly / make it work that way
2. Post in the commercial section viewforum.php?f=88 and ask for a quote to do that for you.
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
I have this modul https://www.opencart.com/index.php?rout ... n_id=31568 and it dosen't do it..
I actually think its really easy for them to do. If you have no luck ..
This is what I suggest
You need to have both in dropdowns and so you must choose a colour and then you must choose a fabric
If you need images .. sorry .. but there is a module for that .. https://www.opencart.com/index.php?rout ... n_id=37073
You don’t have to have prices and you can have it any size you want .. its fully style-able ..
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I also have a Dependent Options module that can do that.
https://www.opencart.com/index.php?rout ... n_id=37957
As you can see in my demo:
https://digitcart.ir/demo/oc/en/3032/1/ ... duct_id=51
For example Upload Image is only required when the Print my image option is selected.
You can try different situations in my demo, it is editable.