cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 1.9 - how to put shipping title(ups/fedex...) in email template(xml,html)?

Magento 1.9 - how to put shipping title(ups/fedex...) in email template(xml,html)?

I want to put the shipping title on order confirmation email.
So i need to bring the data of shipping title in format of xml.

I mean what if you want to put the shippingdescription(carrier + title) on email template, you can use this code.

 

{{var order.getShippingDescription()}}

 

And i also knew that it is same as `$order->getShippingDescription()`
. Btw even i check it out about shipping title, i just only a few information about that

 

app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php

if ($method) {
            foreach ($address->getAllShippingRates() as $rate) {
                if ($rate->getCode()==$method) {
                    $amountPrice = $address->getQuote()->getStore()->convertPrice($rate->getPrice(), false);
                    $this->_setAmount($amountPrice);
                    $this->_setBaseAmount($rate->getPrice());
                    $shippingDescription = $rate->getCarrierTitle() . ' - ' . $rate->getMethodTitle();
                    $address->setShippingDescription(trim($shippingDescription, ' -'));
                    break;
                }
            }
        }

 

Anyway, i tried a lot of options like,

 

- {{var order.getShippingDescription()}}
- {{var address.getMethodTitle()}}
- {{var quote.getMethodTitle()}}
- {{var rate.getMethodTitle()}}

 

 

But it didn't work. Do i have to create module for getting method title? like this?

ttp://magento.stackexchange.com/questions/30487/transactional-email-how-to-customize-shipping-address-variable-html-var-order