繁体   English   中英

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

[英]Opencart - Notice: Undefined index: saving in

我正在使用Opencart 1.5.6.1。

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

某些产品存在错误,请保存:注意:未定义索引:保存在/home/jefferso/public_html/test/vqmod/vqcache/vq2-catalog_view_theme_pav_fashion_template_product_category.tpl中的第147%行

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

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

转到您的源> 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>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM