Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $customerAddressID = '24'; // your customer address id
- $customerID = '1';
- $customer = Mage::getModel('customer/customer')->load($customerID);
- $defaultBilling = $customer->getDefaultBillingAddress();
- $defaultShipping = $customer->getDefaultShippingAddress();
- if ( ! $defaultBilling ) {
- $def_billing = 0;
- } else {
- $def_billing = $defaultBilling->getData('entity_id');
- }
- if ( ! $defaultShipping ) {
- $def_shipping = 0;
- } else {
- $def_shipping = $defaultShipping ->getData('entity_id');
- }
- if(($customerAddressID == $def_billing) || ($customerAddressID == $def_shipping))
- {
- // your address is default billing or shipping address
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement