Change “Shipping & Handling” text in checkout review
Ok
I got it myself, you need to edit or overwrite with a custom
extension the following file:
"app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php"
around
line 184 (Magento 1.7.0.2) you'll find the method
"fetch(Mage_Sales_Model_Quote_Address
$address)" here you'll find
"Mage::helper('sales')->__('Shipping
& Handling');".
HOW TO CHANGE THE MAGENTO ‘SHIPPING & HANDLING’ OUTPUT
Today
I needed to change the output of the
Shipping
& Handling ($description) text
that gets output in the cart and checkout tables. Now it would have
been very easy to simply change the text
inapp/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php:public function fetch(Mage_Sales_Model_Quote_Address $address) {
$amount
= $address->getShippingAmount();
if
($amount != 0 || $address->getShippingDescription()) {
$title
= Mage::helper('sales')->__('Shipping & Handling');
if
($address->getShippingDescription()) {
$title
.= ' (' . $address->getShippingDescription() . ')';
}
$address->addTotal(array(
'code'
=> $this->getCode(),
'title'
=> $title,
'value'
=> $address->getShippingAmount()
));
}
return
$this;
}
How to change the label of “shipping & handling” in cart page of Magento
a.
Go to app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php
on line no.184, there is a fetch() function.
b. In that change the value of “$title = Mage::helper(‘sales’)->__(‘Shipping & Handling’);” with the custom text. Eg: $title = Mage::helper(‘sales’)->__(‘Shipping & Delivery’);
c. Then save the file.
b. In that change the value of “$title = Mage::helper(‘sales’)->__(‘Shipping & Handling’);” with the custom text. Eg: $title = Mage::helper(‘sales’)->__(‘Shipping & Delivery’);
c. Then save the file.
In
this blog we are explaining how to change the label of shipping &
handling in cart page of Magento.
We can done this in two ways.
By changing the core files.
b. Then add the following,
“Shipping & Handling”,”Shipping”
c. After that save the file.By changing translate.csv file. We can avoid the core change of the file by this method.
c. After that save the file.By changing translate.csv file. We can avoid the core change of the file by this method.
No comments:
Post a Comment