VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: ThijsGaublomme on August 18, 2016, 08:54:13 AM

Title: VM3 User fields: Date or ageverification don't work / save date in database
Post by: ThijsGaublomme on August 18, 2016, 08:54:13 AM
Hello,

I allready searched the forum and internet but haven't found a solution.

I would like to add a user field in the registration form where users can fill in their birthdate.
We work wit ACYSMS to send birthday sms's with a coupon code.

I've tried the date field, result: Datepicker shows only this year (2016) Not usefull for a birthdate.
I've tried the age verification, result: Date gets picked correct, but when I save this, the database field stays empty.

How can I add a date field with a datepicker in the user registration of virtuemart on my website.

I work with joomla Joomla! 3.6.2 and  VirtueMart 3.0.16

Thank you for a quick reply!
Title: Re: VM3 User fields: Date or ageverification don't work / save date in database
Post by: GJC Web Design on August 18, 2016, 10:20:18 AM
Don't know why birthday doesn't save but u can change the date range in
administrator\components\com_virtuemart\helpers\vmjsapi.php ~ line 782

from

'.$yearRange.'

to

yearRange:"1900:2016",

or play around with the call in administrator\components\com_virtuemart\models\userfields.php
Title: Re: VM3 User fields: Date or ageverification don't work / save date in database
Post by: ThijsGaublomme on August 18, 2016, 11:29:05 AM

This worked perfectly!

Thank you very much.
Title: Re: VM3 User fields: Date or ageverification don't work / save date in database
Post by: aftertaf on June 16, 2018, 17:52:23 PM
same issue here, one line 793 i made the suggested change but it's not fixing it at all...
any help would be appreciated..
(vm 3.2.14)