如何解决产品列表中的 prestashop 比较按钮
我想将比较按钮(存在于 product.tpl 中)添加到 product-list.tpl,我尝试复制存在于 product.tpl 中的代码
item.innerHTML = data.time
到product-list.tpl
{if isset($comparator_max_item) && $comparator_max_item}
<div class="compare">
<a class="add_to_compare" href="#" data-id-product="{$product->id|intval}" style="color:black;"><i class="fas fa-cubes" style="font-size:1.3em;padding-right:.4em;"></i> {l s='Add to Compare'}</a>
</div>
{/if}
{include file="./product-compare.tpl"}
</div>
{*Products compare *}
{addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL}
{addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL}
{addJsDef comparator_max_item=$comparator_max_item}
{addJsDef comparedProductsIds=$compared_products}
我不知道我错过了什么......有人可以提供一些灯吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。