我正在开发magento CE 1.8的网站 . 我有一些产品有撇号(')在他们的名字中签名,如ABC的 . 问题是,当我点击添加到购物车按钮时,我无法将这些特定产品添加到购物车中,因为没有发生任何事情 . 有没有解决这个问题的方法,因为当我搜索谷歌时,我找不到一个 . 非常感谢提前 .
如果它是一个单引号(即不是撇号),请尝试转义 ' char: \' .
'
\'
你需要使用:
echo $this->escapeHtml($_product->getName());
要么
$_helper = Mage::helper('catalog/output'); echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
2 回答
如果它是一个单引号(即不是撇号),请尝试转义
'
char:\'
.你需要使用:
要么