我的网站上有很多产品。对于所有此产品,我想在简短说明后写上“请联系:xxx-xxx-xx”。我想知道我需要在哪个php文件中在我的产品说明中添加此常见段落。
如果要在product listing
页面中使用它,则必须导航到:
app/design/frontend/yourtheme/package/template/catalog/product/list.phtml
在此文件中查找以下行:
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
如果要将其添加到product details
页面,则应导航至:
app/design/frontend/yourtheme/package/template/catalog/product/view.phtml
并在此行下方添加您的句子:
<div class="short-description">
<div class="std">
<?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>
</div>