9/14/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

1 comment:

  1. Good work done by blog author.i will definitely use it and change it into magento.
    -magento mobile

    ReplyDelete