VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: aftertaf on September 06, 2018, 21:22:31 PM

Title: Date of Birth for shoppers
Post by: aftertaf on September 06, 2018, 21:22:31 PM
Hi,
Does anyone know a working way (core hack, override, whatever,...) to get joomla! or Virtuemart to store the date of birth of shoppers?
I've searched the forum and found one thread without a solution as such (couldn't get it to work), and can't find any other documentation, example or use-case that anyone has described...
Using J3.8.12 and latest vm 3.2.14..
any pointers would be really appreciated, as i have so little time to dig around at the moment, so if anyone has already done something along these lines, would be great so see how you did it.
thx
Title: Re: Date of Birth for shoppers
Post by: Studio 42 on September 07, 2018, 00:52:02 AM
You can create a userfield date plugin and only show this in the BT address
Title: Re: Date of Birth for shoppers
Post by: aftertaf on September 29, 2018, 22:47:34 PM
ok, but is there a way to make it actually be a date picker, not just a text field ?
I specified type 'date' when i created the new field, but in the frontend i can type 1975/01/01 or 01/01/1975 and neither get stored when i save the user.

I can add one in Joomla, and make it required, but I can't make this field then appear in the user profile for VM, or during registration process.
Isn't there a way to link Joomla and VM user fields ?
Title: Re: Date of Birth for shoppers
Post by: aftertaf on September 29, 2018, 22:55:19 PM
i've also tried the datepicker (age verification) field type : impossible to enter a value that the system actually accepts, and by making it mandatory i can't create a new account. So something is not working right here.
Would be much easier to just make any Joomla userfields that are flagged as mandatory appear in the VM registration/user maintenance page in same manner as e mail, username, etc...
Title: Re: Date of Birth for shoppers
Post by: Studio 42 on September 30, 2018, 00:47:21 AM
I already answered you.
You need to use a VM userfield plugin, so you can write your own code
Title: Re: Date of Birth for shoppers
Post by: aftertaf on September 30, 2018, 18:47:57 PM
i'm a user with some overriding experience : i don't have the knowledge to do as you say, or the time to learn at the moment...
Anyway, i found a workaround, using the system user profile plugin, i can ask for DoB to be displayed, albeit on the joomla user profile page and not the virtuemart one.
this is enough for me to do what I need this for.