0

I'm using Opencart 1.5.6.1.

In this page: http://jefferson.com.my/test/index.php?route=product/results&category=[75]&path=0&filterProduct=1

There's error in some products, SAVE Notice: Undefined index: saving in /home/jefferso/public_html/test/vqmod/vqcache/vq2-catalog_view_theme_pav_fashion_template_product_category.tpl on line 147%

It's because I install a mod that display the discounted percentage. It doesn't have problem displaying in category page, product page and home page, but if you try the filter on the left (tick T-shirt) which resulted in the page above, the error will show out.

I don't know how to deal with that cache file, and the theme developer doesn't want to help at all.

halfer
  • 19,824
  • 17
  • 99
  • 186
TheDarkKnight
  • 35
  • 1
  • 9
  • Please mention here theme vqmod file code. Go to your site source > vqmod > xml > & find yourtheme.xml file(may be it xml file name will theme name). – HDP Jun 26 '14 at 13:31
  • Hi, the theme doesn't have a VQmod. But the show saving percentage mod is a vqmod can be found here: http://www.opencart.com/index.php?route=extension/extension/info&extension_id=4498&filter_search=special%20percentage – TheDarkKnight Jun 27 '14 at 05:03
  • Hi, I have check it extension. but, it is working fine. Please mention here your category.php file code. (catalog > controller > product > category.php) – HDP Jun 27 '14 at 05:18
  • Hi Harnish, you can check the category.php file here: http://pastebin.com/p0NfVF4e – TheDarkKnight Jun 27 '14 at 06:05
  • it link is not working. – HDP Jun 27 '14 at 06:34
  • Weird, please try this: http://chopapp.com/#aouqhuqg – TheDarkKnight Jun 27 '14 at 07:36
  • Or this dropbox link: https://db.tt/E609X3XD – TheDarkKnight Jun 27 '14 at 07:58
  • Sorry, miss-understanding Here, I have realized. You have use third party extension for Filter By. So, According to your this link(http://jefferson.com.my/test/index.php?route=product/results&category=[75]&path=0&filterProduct=1) is not category page. This link page is new custom page. So, **Here, You need to find it page name. what is name of it new page file?(page name of Filter by extension)** & let me know. so I will send code it page related. Go to > catalog > controller > product > & then check new file name(May be results.php). – HDP Jun 27 '14 at 09:30
  • Hi Harnish, can you download the mod here, with all the files because I don't know where to look, really appreciate your help. https://db.tt/uxzkcbbe – TheDarkKnight Jun 27 '14 at 09:53
  • I'm voting to close because _Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself_. – halfer Dec 22 '15 at 18:32

1 Answers1

1

Go to your source > vqmod > xml > & then find & open "webvet_percentage_to_specials_v6.xml" file > & then below code add in bottom of the page above </modification> tag. > & then check it.

// 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>
HDP
  • 4,005
  • 2
  • 36
  • 58