Page 1 of 1

Birthday in checkout

Posted: 02 Nov 2016, 13:30
by hausformat
Hallo, i would like to include the customers birthday field in the checkout process.
With that i have some problems.

my configuration for the checkout is:

Code: Select all

plugin.tx_aimeos.ettings.client.html.checkout.standard.address.billing.mandatory {
  0 = order.base.address.salutation
  [...]
  8 = order.base.address.countryid
  9 = addressExtra/customer.birthday
  [...]
}
with the version 16.7.0 from TER the field appears as expected.
But I could not go any step further, because the Field "addressExtra/customer.birthday" is never Valid, or could not be found in the "address".

Now i have seen, that some bugfixes with the birthday field were made in the newest version from Aimeos, so i made the update to 16.10.1

And now the field never is shown up in the checkout process.

Can Anyone Help me?

Thanks
David

Re: Birthday in checkout

Posted: 02 Nov 2016, 14:01
by aimeos
The birthday field is special because it doesn't belong to the order address. Instead, it's part of the customer account and will be stored there when the order is placed. Therefore, you can't use the "...mandatory" or "...optional" configuration settings. Instead, simply display the field via CSS:

Code: Select all

.aimeos .checkout-standard-address-billing .birthday {
  display: block;
}

Re: Birthday in checkout

Posted: 02 Nov 2016, 15:20
by hausformat
thx

Now the field shows up, but there is no data stored in the customer...
Do I have to configure some validation or/and a table/field mapping?

Image

best regards
David

Re: Birthday in checkout

Posted: 02 Nov 2016, 15:28
by hausformat
Ok, my fault!

This works fine with new customers.
But the field is not updated if an existing customer order something new!
How can I solve this Problem?

Another problem is, that I should mark the field as mandatory.
Could I made this only with JS?

best regards
David

Re: Birthday in checkout

Posted: 02 Nov 2016, 19:33
by aimeos
hausformat wrote: This works fine with new customers.
But the field is not updated if an existing customer order something new!
How can I solve this Problem?
Hm, that's difficult at the moment. Is this a real problem for you e.g. do you have an already running Aimeos shop with a lot of customers?
hausformat wrote:Another problem is, that I should mark the field as mandatory.
Could I made this only with JS?
You can add the "mandatory" CSS class to the "div.form-item". The rest should be done by the JS implementation. There's no PHP check in the backend yet.

We think about adding the birthday to address instead of the account in the next version. This will make it work the same way as the other fields. The current implementation was done for a customer of the Aimeos GmbH IIRC. Short before the LTS release, such a big change wasn't possible any more.