Opencart - 注意:未定义的索引:保存在

时间:2014-06-26 11:36:13

标签: php jquery e-commerce opencart vqmod

我使用的是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的第147行

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

我不知道如何处理该缓存文件,主题开发人员根本不想提供帮助。

1 个答案:

答案 0 :(得分:1)

转到您的来源&gt; vqmod&gt; xml&gt; &安培;然后找到&amp;打开“webvet_percentage_to_specials_v6.xml”文件&gt; &安培;然后在代码下方添加</modification>标记上方的页面底部。 &GT; &安培;然后检查一下。

// 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>