Skip to content

Commit

Permalink
Explicitly load the customer address from the database for new customers
Browse files Browse the repository at this point in the history
default_billing and default_shipping are alread filled for a newly saved customer,
but the address is not yet loaded in the customer object's addresses collection.
The address needs to be loaded explicitly from the database to be able to use
it in the activation email.
  • Loading branch information
markvds committed Nov 14, 2016
1 parent b4cd237 commit 9efe35c
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -129,8 +129,8 @@ protected function _sendNotificationEmail($to, $customer, $templateConfigPath, $
$recipient['name'],
array(
'customer' => $customer,
'shipping' => $customer->getPrimaryShippingAddress(),
'billing' => $customer->getPrimaryBillingAddress(),
'shipping' => $customer->getAddressById($customer->getDefaultShipping()),
'billing' => $customer->getAddressById($customer->getDefaultBilling()),
'store' => Mage::app()->getStore(
// In case of admin store emails, $storeId is set to 0.
// We want 'store' to always be set to the customers store.
Expand Down

0 comments on commit 9efe35c

Please sign in to comment.