0

I found two problems with the email confirmation order made by a guest with Magento CE 1.9.

  1. I receive the confirmation email only on one email account, even if I set it up on two email account
  2. I don't see the VAT code on the email, even if I've made the VAT field as required, also for guest, and I've put this data on the email template using this code → {{var order.getData('customer_taxvat')}}

The really strange thing is that if it's a normal order, the correct email is sent to both of them and I see the VAT field.

If it's a guest's order the email is sent to only one email and the VAT field is empty (or null, I don't know).

Someone knows why?

0

For the 2. I think when you put an another variable in the template you have also put it into the order.php (app/code/core/Mage/Sales/Model/). In my case I put the customergroup code into the email. So I take this code into the order.php:

// Get customer group name for email template.
    public function getCustomerGroupName(){
    if ($groupId = $this->getCustomerGroupId()){
        $group = Mage::getModel ('customer/group')->load($groupId);
        if ($group->getId()){
            return $group->getCode();
        }
    }
    return '';
    }

maybe it could help you for your emailtemplate. In the template I call it with:

{{var order.getCustomerGroupName()}}

For the 1. problem: Have you set the right template in the order configuration? Maybe the variable is not caled there.

  • I respond in order: 1) Yes, I set the right template. There is a problem sending of the email, not only on the code of the template. 2) But why the same variable works if the order arrived from a registered user? – Roberto Bianchi Nov 3 '17 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.