Post by djbhox » Wed Jan 22, 2020 10:54 pm

Hello!

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.

Newbie

Posts

Joined
Fri Jan 17, 2020 5:36 pm

Post by by mona » Wed Jan 22, 2020 10:58 pm

Hi

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


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by djbhox » Thu Jan 23, 2020 5:07 pm

Yes I allready have this modul, but I think I didn't explain it very well, I don't want dependent options (I allready have this) what I need is how to make some options mandatory only if another option is selected.

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?

Newbie

Posts

Joined
Fri Jan 17, 2020 5:36 pm

Post by by mona » Thu Jan 23, 2020 6:39 pm

Hi,

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


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by djbhox » Thu Jan 23, 2020 7:24 pm

Hello,

I have this modul https://www.opencart.com/index.php?rout ... n_id=31568 and it dosen't do it..

Newbie

Posts

Joined
Fri Jan 17, 2020 5:36 pm

Post by by mona » Thu Jan 23, 2020 7:44 pm

well personally I would contact the developer ..
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


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by JNeuhoff » Thu Jan 23, 2020 8:24 pm

The one from MarketIngSG does exactly what you intend to do. We have been using it successfully for years.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by DigitCart » Thu Jan 23, 2020 9:35 pm

Hi
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.

My Extensions


User avatar
Active Member

Posts

Joined
Thu Jun 22, 2017 5:32 pm

Who is online

Users browsing this forum: NicNie, shanghua and 395 guests