0

我正在使用 Opencart 1.5.6.1。

在此页面中:http: //jefferson.com.my/test/index.php ?route=product/results&category=[75]&path=0&filterProduct=1

部分产品有错误,SAVE 注意:未定义索引:保存在 /home/jefferso/public_html/test/vqmod/vqcache/vq2-catalog_view_theme_pav_fashion_template_product_category.tpl on line 147%

这是因为我安装了一个显示折扣百分比的模组。它在分类页面、产品页面和主页中显示没有问题,但是如果您尝试左侧的过滤器(勾选T恤)导致上述页面,则会显示错误。

我不知道如何处理那个缓存文件,主题开发者根本不想帮忙。

4

1 回答 1

1

转到您的源 > vqmod > xml > & 然后找到并打开“webvet_percentage_to_specials_v6.xml”文件 > & 然后在页面底部的标签上方添加下面的代码</modification>。> & 然后检查它。

// FILTER PAGE
<file name="catalog/controller/product/results.php">

    <operation>
        <search position="after"><![CDATA[
        'special'     => $special,
        ]]></search>

        <add><![CDATA[
        'saving'     => round((($result['price'] - $result['special'])/$result['price'])*100, 0),
        ]]></add>
    </operation>
</file>

<file name="catalog/view/theme/*/template/product/result.tpl">

    <operation>
        <search position="after"><![CDATA[
        <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
        ]]></search>

        <add><![CDATA[
        <br /><span style="color: red;">SAVE <?php echo $product['saving']; ?>%</span>
        ]]></add>
    </operation>
</file>
于 2014-06-27T11:28:04.943 回答