Guest User

Untitled

a guest
Jul 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. $customerId = /* Required Customer ID */;
  2. $customer = Mage::getModel('customer/customer')->load($customerId); // insert customer ID
  3.  
  4. foreach ($customer->getAddresses() as $address)
  5. {
  6. $data = $address->toArray();
  7. var_dump($data);
  8. }
  9.  
  10. $customerId = /* Required Customer ID */;
  11. $customer = Mage::getModel('customer/customer')->load($customerId); // insert customer ID
  12.  
  13. $primaryBillingAddress = $customer->getPrimaryBillingAddress(); /* Primary Billing Address */
  14. $primaryShippingAddress = $customer->getPrimaryShippingAddress(); /* Primary Shipping Address */
  15.  
  16. $defaultBillingAddress = $customer->getDefaultBillingAddress(); /* Default Billing Address */
  17.  
  18. $defaultShippingAddress = $customer->getDefaultShippingAddress(); /* Default Shipping Address */
Add Comment
Please, Sign In to add comment