1
votes

I'm developing a site in magento CE 1.8. I have some products which have apostrophe (') sign in their names like ABC's. Problem is, I can't add these specific products to the cart as nothing is happening when I click the add to cart button. Is there any solution for this problem as when I searched through google, I couldn't find one. Much thanks in advance.

2

2 Answers

0
votes

If its a single quotation mark (ie not an apostrophe), try escape the ' char: \'.

0
votes

You need to use:

echo $this->escapeHtml($_product->getName());

or

$_helper = Mage::helper('catalog/output');
echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>