后台产品目录批发价格栏



在Prestashop 1.7上寻求帮助。需要添加一个额外的列来在产品目录页面上显示批发商价格。似乎可变产品.wholesal_price不起作用,因为显示不适用

我已尝试编辑/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/products_table.html.twig

并添加

<th scope="col" class="text-center" style="width: 9%">
{{ ps.sortable_column_header("Wholesale price"|trans({}, 'Admin.Catalog.Feature'), 'wholesale_price', orderBy, sortOrder) }}
</th>

还编辑了/src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/list.html.twig

并添加了代码

<td class="text-center">
<a href="{{ product.url|default('') }}#tab-step2">{{ product.wholesale_price|default('N/A'|trans({}, 'Admin.Global')) }}</a>
</td>

但没有成功,无法使其发挥作用。附件照片显示为N/A有什么建议和帮助吗?

后台产品目录列表中的Wholesale_price列

最好的方法是使用actionAdminProductsListingFieldsModifier挂钩。

在github上查看此模块,可能会对您有所帮助https://github.com/FuenRob/Modules-Prestashop-1.7/tree/master/addcolumninlist

最新更新