On the checkout/cart page I need to change the Shopping cart title.
Where can I find it in the code?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Never edit core files in Magento!
You can define custom translations in your theme, create the following file if it does not exist yet:
en_US if you use a different language)
Note that this should be a project specific theme, not
some_bought_theme/default. If you did not already, you can add a child theme next to
default and specify this one as theme in the system configuration. You don't need to copy anything from the
default directory since Magento falls back automatically, so you only need to add the files that are customized.
translate.csv you can add your custom translations. Since the translated string is "Shopping Cart" and it's coming from the
Mage_Checkout module, you need to add this line:
"Mage_Checkout::Shopping Cart","Whatever you want to display instead"
The file in question is:
Although you should not be editing any core files so you remain update-friendly.
To change the page heading you need to go to your theme and open (based on the 1.9.1 RWD theme):
and look for and edit:
<h1><?php echo $this->__('Shopping Cart') ?></h1>
Although, again, as explained in my comments you could simply edit your locale file and 'translate' what you wish to change.
/app/locale/en_US/Mage_Checkout.csv and see in line 295:
"Shopping Cart","Shopping Cart"
and change this to:
"Shopping Cart","Whatever text you want to show instead!!"
As I already answered at "Change Shopping Cart Title" article...
Basically you just need to add this code in your
XML file. In this case
<referenceBlock name="page.main.title"> <action method="setPageTitle"> <argument translate="true" name="title" xsi:type="string">Basket</argument> </action> </referenceBlock>
After change doesn't forget to flush the cache.
php bin/magento cache:flush