Thứ Ba, 14 tháng 9, 2010

change My Cart text in magento

To Chnage the text of My Cart in top links you need to go app/code/core/Mage/Checkout/Block/ there you will find Links.php .there will be below function




public function addCartLink()

{

if ($parentBlock = $this->getParentBlock()) {

$count = $this->helper(’checkout/cart’)->getSummaryCount();



if( $count == 1 ) {

$text = $this->__(’My Cart (%s item)’, $count);

} elseif( $count > 0 ) {

$text = $this->__(’My Cart (%s items)’, $count);

} else {

$text = $this->__(’My Cart’);

}



$parentBlock->addLink($text, ‘checkout/cart’, $text, true, array(), 50, null, ‘class="top-link-cart"’);

}

return $this;

}


Change “My Cart” to your required text and Upload it to server.then clear the catche to see the effect

Không có nhận xét nào:

Đăng nhận xét