How to set a default billing address

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
cnoelker
Advanced
Posts: 140
Joined: 20 Feb 2016, 18:21

How to set a default billing address

Post by cnoelker » 20 Jul 2020, 16:07

Hello,
as for the billing/payment address, there is always a standard address, so if I access getAddresses() from the standardBasket, then this contains at least one payment address.

Which class needs to be overwritten so that I can set a default delivery address, if the (logged in) user has at least one billing address?

Claudia

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

Re: How to set a default billing address

Post by aimeos » 22 Jul 2020, 07:41

There's no good reason to duplicate the billing address and add it again as delivery address because the Aimeos code already uses the billing address if no delivery address has been added to the order.

If you want to add the first delivery address of the customer to the order automatically, you can change the template code so the first delivery address is pre-selected instead of "like billing address":
https://github.com/aimeos/ai-client-htm ... hp#L42-L67
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

cnoelker
Advanced
Posts: 140
Joined: 20 Feb 2016, 18:21

Re: How to set a default billing address

Post by cnoelker » 22 Jul 2020, 08:15

Oh, sorry, I accidentally wrote "billing". No, it's all about the delivery address which I want to set as a default.

Thank you for the pointer to the correct file.

Post Reply