VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: 6.522 on April 07, 2016, 22:43:13 PM

Title: make customer comment field required at checkout in VM 2.6.22
Post by: 6.522 on April 07, 2016, 22:43:13 PM
Hi, I know this is covered in VM 3x now but I need a solution to make a customer comment field required at checkout in VM 2.6.22, please :) - without updating to VM 3x ;)
Regards

my joomla ver 2.5.28
Title: Re: make customer comment field required at checkout in VM 2.6.22
Post by: GJC Web Design on April 08, 2016, 23:06:49 PM
jquery snippet to disable the chk out button until comment is filled
or hack the vm validation script to incl comment

or does the textarea just need a required class etc?
Title: Re: make customer comment field required at checkout in VM 2.6.22
Post by: 6.522 on April 08, 2016, 23:44:09 PM
Hey, thanks for the tips! :) Yes I just need something that will not allow user to complete the check out if the comment field is empty - the simplest solution that will do the job. :)
Regards
Title: Re: make customer comment field required at checkout in VM 2.6.22
Post by: 6.522 on April 09, 2016, 18:03:03 PM
Ok, so I ended up adding the "required" attribute to the textarea - as you suggested - and it works. :) The downside is IE9 (and lower) does not support this - is there a way to do sth about it?
Regards
Title: Re: make customer comment field required at checkout in VM 2.6.22
Post by: jenkinhill on April 09, 2016, 19:29:37 PM
Detect that old browser and send them to an update site? Or link to https://www.microsoft.com/en-gb/WindowsForBusiness/End-of-IE-support

Alternatively you may have to hack the validation script.
Title: Re: make customer comment field required at checkout in VM 2.6.22
Post by: 6.522 on April 10, 2016, 22:03:18 PM
Thanks! I think I will leave it as it is for now, but if I would decide to change the validation script where should I start with?
Regards