Tuesday, June 29, 2010

Magento - Ampersand in Product name not showing properly

Some of the products added to a test Magento cart had ampersand & character in the name. When viewing the product page for such products, the ampersand in the name was being shown as & a m p ; which is the special HTML entity for the ampersand character.

I was at a loss and almost on the verge of advising that Product name should not contain and special characters. However, while fiddling with the settings, I stumbled upon the setting in the attribute that allows HTML code in the name.

In the back-end admin, go to Catalog >> Attributes >> Manage Attributes menu and then click on the name attribute. Set the Allow HTML-tags on Front-end to Yes and you are all set to show ampersand and other special characters properly in the product name!

In fact, this same approach can be used for any field that is displaying such a similar behavior.

1 comment:

Darshan Shah said...

Apparently, this is the default behavior now in the latest version of Magento - 1.4.1.1

LinkWithin

Related Posts Plugin for WordPress, Blogger...