Guest User

Untitled

a guest
Feb 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. if ($this->getCustomerIsGuest())
  2. and add the following code into the else statement:
  3. $customerGroup = Mage::getModel('customer/group')->load($this->getCustomerGroupId());
  4. if ($customerGroup->getEmail()) {
  5. $copyTo[] = $customerGroup->getEmail(); // getting value from your custom field
  6. }
  7.  
  8. if ($this->getCustomerIsGuest()) {
  9. $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId);
  10. $customerName = $this->getBillingAddress()->getName();
  11. } else {
  12. $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE, $storeId);
  13. $customerName = $this->getCustomerName();
  14. $customerGroup = Mage::getModel('customer/group')->load($this->getCustomerGroupId());
  15. if ($customerGroup->getEmail()) {
  16. $copyTo[] = $customerGroup->getEmail();
  17. }
  18. }
Add Comment
Please, Sign In to add comment