Add another shipping address when registering a customer

I am trying to get it so that the customer can add the delivery address in addition to the billing address when creating the account. I can now add an address that will act as billing and shipping. I can copy the billing address fields, but how to do this to get two addresses when sending? How to get client-side validation to process new fields?

+4
source share
1 answer

It looks like you can customize the encoding that is not suitable. Instead, follow these steps:

Open application / design / interface / default / default / template / customer / form / register.phtml

Around line 78 before

<?php if($this->getShowAddressFields()): ?> 

Add

 <?php $this->setShowAddressFields(true); ?> 

This will add a collection of addresses to the form on the registration page, check it in the same way as other forms on the site, and insert it as the address of the invoice and delivery.

+1
source

Source: https://habr.com/ru/post/1379067/


All Articles