Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($this->getCustomerIsGuest())
- and add the following code into the else statement:
- $customerGroup = Mage::getModel('customer/group')->load($this->getCustomerGroupId());
- if ($customerGroup->getEmail()) {
- $copyTo[] = $customerGroup->getEmail(); // getting value from your custom field
- }
- if ($this->getCustomerIsGuest()) {
- $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId);
- $customerName = $this->getBillingAddress()->getName();
- } else {
- $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE, $storeId);
- $customerName = $this->getCustomerName();
- $customerGroup = Mage::getModel('customer/group')->load($this->getCustomerGroupId());
- if ($customerGroup->getEmail()) {
- $copyTo[] = $customerGroup->getEmail();
- }
- }
Add Comment
Please, Sign In to add comment