1

If you add a product to the shopping cart, a message pops up on top saying "Cannot add the item to shopping cart."

The problem is that you need to log in first, but this is not clear to the customer. So I would like to change the message in something like "You need to login first".

Now I have tried to find the string in the csv files, but cannot find it. I have tried to add the string to translate.csv but that does not work.

I tried inline translation, but no little book appears with the popup message, so I cannot change it. I tried template hints to see where it comes from, but here too, I don't see anything.

I am stuck and wonder where the string comes from. The English string is translated into Dutch, so it must be somewhere. Right?

1

"Cannot add the item to shopping cart" appears in Mage_Sales.csv as well as in Mage_Checkout.csv and Mage_Wishlist.csv. If multiple modules contain the translation, you must specify the module scope if you are using translate.csv. To translate it in all cases, use:

"Mage_Checkout::Cannot add the item to shopping cart","your translation here"
"Mage_Sales::Cannot add the item to shopping cart","your translation here"
"Mage_Wishlist::Cannot add the item to shopping cart","your translation here"

More information about translation scopes: https://magento.stackexchange.com/a/78483/243

0

Log into your server and change directory to your Magento installation, then run

grep -irl "Cannot add the item to shopping cart" *

This will search your entire Magento installation for the string and show you which file contains the string you want to translate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.