New Zenner
- Join Date:
- Feb 2009
- Location:
- Sydney, Australia
- Posts:
- 44
- Plugin Contributions:
- 0
Primary Mailing Address in addition to a Primary Shipping Address
I am trying to create an add-on which allows customers to identify their primary "mailing address" in addition to their primary "shipping address".
I think I am getting the hang of things, I have added an extra field in the customers table called customers_default_postal_id. It has a number which collates to the address I want in the address book just the same as customer_default_address_id (ie. an Address ID of the corresponding address related to the customer in the address_book table)
When identifying this in the address_book.php, I just can't seem to work out how the command ```php
<?php echo zen_address_label($_SESSION['customer_id'], $_SESSION['customer_default_address_id'], true, ' ', '<br />'); ?>
I know that the field in the customer table is called **customers_default_address_id** but in the command line above it uses **customer_default_address_id** (ie with no "s" after customer*s*]).
Please excuse me if this sounds ignorant but how does this work? How does the page recognize that the session 'customer_default_address_id' uses the data from the field customers_default_address_id in the customers table.
Thank you in advance for any help or ideas.