Pergunta

I am working with a client who is primarily wholesale, the subject line needs to focus on things like shipping method and warehouse information than about the order id or the web URL of the store.

I am trying to find any ways of achieving this.

Foi útil?

Solução

You can include in the subject any variable you pass to the template. You can try to include this in the order e-mail subject

{{var order.getShippingDescription()}}

I'm not sure how it will behave with if it has tags in it.
If that doesn't work, you can override the sendNewOrderEmail and sendOrderUpdateEmail to pass additional parameters to the template and use them in the subject.
[EDIT]
For example the variables are passed in the sendNewOrderEmail method like this:

$mailer->setTemplateParams(array(
        'order'        => $this,
        'billing'      => $this->getBillingAddress(),
        'payment_html' => $paymentBlockHtml
    )
);

Anything you add in that array you will be able to use in the template as variable. If you make the code above look like:

$mailer->setTemplateParams(array(
        'order'        => $this,
        'billing'      => $this->getBillingAddress(),
        'payment_html' => $paymentBlockHtml
        'foo'          => 'bar'
    )
);

You will be able to use in the template {{var foo}} and get the value bar.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top