Jump to content

How to assign by default different adrresses to billing and shipping?


Recommended Posts

Hello everyone,
i needed to customize the order process in the address choose in this way:
CUSTOMERS WILL HAVE MAX 2 ADDRESSES:
the first address is created in the account registration step along with billing infos, so tis first address will be set as "my billing address"
the second one will carry only the shipping infos, no vat, company, dni, and will be titled "my shipping address".

In the address.tpl the field "alias" is hidden so titles can't be edited, nor is possibile add another address ("my shipping address" already exists)
In the addresses.tpl the button "add address" is unvisible if $addresses count > 1 and deletion is unvisible if $addresses count <2.
Now the order-address.tpl page look rather fine, but even with 2 addresses the default selected shipping address is the 1st address (my billing address) i need the 2nd one (my shipping address) to be loaded by default
Think the trick is in the js in the theme (/themeroot/js/order-address.js) that assign to both cart addresses the same id (or alias). The real change of address happens only on select change
Can't go over on , every try fails. Even if the right address is displayed, the form registers anyway the same addr. for billing and shipping.

Anyone have some hints about? Thanks in advance!

post-380213-0-70936100-1403095593_thumb.jpg

Edited by straynetworks (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...