magento - 如何在产品的简短描述中添加通用段落。Magento 1
问题描述
我的网站上有很多产品。对于所有这些产品,我想在简短描述之后写上“请联系: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>
推荐阅读
- machine-learning - 将所有功能与目标变量放在同一范围内如何影响性能?
- search - 如何查询 solr 以获得完整的结果,而不是消除结果中的空值
- c - 在C中连接双指针char数组
- onesignal - 用户(Android 设备)未显示在 OneSignal 仪表板中。OneSignal AppId 格式无效反应
- android - GridView 项目位置在滚动时动态更改位置
- sql - 无法将 varchar 转换为 int 或减去它们
- python - 如何将 HTML 表单中文本输入的名称设置为变量
- c++ - 修改 std::map 的键
- zip - 下载 zip 文件、解压缩和安全删除它的有效方法
- python - 给定用户的输入,如何在 O(logN) 时间内搜索字谜?