Birthday in checkout

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
hausformat
Posts: 3
Joined: 02 Nov 2016, 10:57

Birthday in checkout

Post by hausformat » 02 Nov 2016, 13:30

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

User avatar
aimeos
Administrator
Posts: 3787
Joined: 01 Jan 1970, 00:00

Re: Birthday in checkout

Post by aimeos » 02 Nov 2016, 14:01

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;
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

hausformat
Posts: 3
Joined: 02 Nov 2016, 10:57

Re: Birthday in checkout

Post by hausformat » 02 Nov 2016, 15:20

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

hausformat
Posts: 3
Joined: 02 Nov 2016, 10:57

Re: Birthday in checkout

Post by hausformat » 02 Nov 2016, 15:28

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

User avatar
aimeos
Administrator
Posts: 3787
Joined: 01 Jan 1970, 00:00

Re: Birthday in checkout

Post by aimeos » 02 Nov 2016, 19:33

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply