Post by Freelancerr » Thu Jul 30, 2020 2:19 pm

Hello!

We are selling rods for fishing. I've added the required dropdown option of yes/no for customization (engraved text on the rod) which is required as with "yes" it adds $20. And I've added input field below for the customer input.

The problem is that sometimes customers print something in the input, whether willingly or unwillingly, and it shows up even if they have chosen option "no", it still gets made with engraving. We have lost a lot of money because people typed in something accidentally and received the rod with some characters that they didn't order/ don't make any sense.

I would like to add condition to the first option yes/no, so the input field stays hidden till the customer chooses "yes", to avoid any accidents. Or to clear all the input if the option is 'no'. Or make input field inactive till customer chooses "yes". Or else...

I would appreciate any input on the matter.
Thank you!

Newbie

Posts

Joined
Thu Jul 30, 2020 1:49 pm

Post by paulfeakins » Thu Jul 30, 2020 5:47 pm

Freelancerr wrote:
Thu Jul 30, 2020 2:19 pm
We have lost a lot of money because people typed in something accidentally and received the rod with some characters that they didn't order/ don't make any sense.
Are you sure there isn't a market for rods branded asdfjkl;? :laugh:

Freelancerr wrote:
Thu Jul 30, 2020 2:19 pm
I would like to add condition to the first option yes/no, so the input field stays hidden till the customer chooses "yes", to avoid any accidents. Or to clear all the input if the option is 'no'. Or make input field inactive till customer chooses "yes". Or else...
There are plenty of extensions for "dependent options", just search and ye shall find.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Freelancerr » Fri Jul 31, 2020 3:14 am

Yeah, plenty of cool new brands ;D

Ok, I will search for it. I am curious how to do it in code, I dabble in some front-end stuff, trying to learn back-end.

Thank you!

Newbie

Posts

Joined
Thu Jul 30, 2020 1:49 pm

Post by by mona » Fri Jul 31, 2020 3:41 am


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 Freelancerr » Fri Jul 31, 2020 10:28 am

by mona wrote:
Fri Jul 31, 2020 3:41 am
well here you go ..
https://stackoverflow.com/questions/197 ... p-down-box
I know how to do it with HTML and JS, but here I am looking for implementation of this in opencart, which is in PHP.
Thank you for the link, although they talk about dropdowns conditioned one on another, which I understand should be similar, but not quite....

Newbie

Posts

Joined
Thu Jul 30, 2020 1:49 pm

Post by sw!tch » Fri Jul 31, 2020 10:31 am

If you require a PHP implementation that would most likely fall more towards a commercial request.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by Freelancerr » Fri Jul 31, 2020 11:49 am

sw!tch wrote:
Fri Jul 31, 2020 10:31 am
If you require a PHP implementation that would most likely fall more towards a commercial request.
Got it, this forum is for "which extension to use because I dont know how the function called".

Thank you folks for your prompt answers!

Newbie

Posts

Joined
Thu Jul 30, 2020 1:49 pm

Post by paulfeakins » Fri Jul 31, 2020 6:22 pm

Freelancerr wrote:
Fri Jul 31, 2020 3:14 am
Ok, I will search for it. I am curious how to do it in code, I dabble in some front-end stuff, trying to learn back-end.
You wouldn't want to try this as a first back-end task as it would get pretty complicated.

If you're looking for an extension, read this first: https://www.antropy.co.uk/blog/how-to-f ... xtensions/

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: Bing [Bot], NicNie, shanghua and 395 guests