9ashes Posted September 29, 2013 Share Posted September 29, 2013 So I'm trying to set up a Catalog Price Rule for my shop but whenever I do, it shows the price of the product as £0.00 - whatever discount I put on it this always happens. It goes into the cart perfectly so I would assume there's an issue with the Product page's coding but I can't for the life of me work it out! This is REALLY urgent and a major issue PLease help!! Link to comment Share on other sites More sharing options...
moth0027 Posted January 9, 2014 Share Posted January 9, 2014 Hello 9ashes, I'm pretty new to PrestaShop - some friends have asked me to manage and maintain their online store after doing their web design for the last couple years. I've added their most recent fashion collection and tweaked some of their previous stuff so I'm fairly familiar to the ways things work... ...or at least I thought I did... when they asked if I could discount their old stock (using the Catalog Price Rule) I ran into the same problem you did. Prices appear on the product pages as £0.00. I'm hoping you may have found a solution or suggest a workaround. Thanks for your help in advance, Moth Link to comment Share on other sites More sharing options...
Sharak Posted January 10, 2014 Share Posted January 10, 2014 Which version of prestashop do you use? What's url of your shop? Link to comment Share on other sites More sharing options...
moth0027 Posted January 10, 2014 Share Posted January 10, 2014 Hello Sharak, I've just upgraded to the latest version (1.5.6.1) to see if the issue was corrected however it's wasn't fixed. The url is http://shop.tatanaka.com. Not sure if this is helpful but this issue only seems to effect the individual product pages. Once added to the shopping cart the prices appear correct in the basket. Also sometimes when the product is out of stock the price appears correct. Here are two links to examples - £0.00 - http://shop.tatanaka.com/index.php?id_product=110&controller=product out of stock, displaying correct price - http://shop.tatanaka.com/index.php?id_product=109&controller=product Thanks for your help and time, Moth Link to comment Share on other sites More sharing options...
Sharak Posted January 11, 2014 Share Posted January 11, 2014 (edited) You probably used incorrect variables for different conditions of price display. Attach file (as file, do not copy whole text) /themes/your_theme/product.tpl or find <div class="price"> (should be around line 390) and show this section to the closing </div>. Should be about 50-60 lines of code. Edited January 11, 2014 by Sharak (see edit history) Link to comment Share on other sites More sharing options...
moth0027 Posted January 13, 2014 Share Posted January 13, 2014 Thank for looking at this again Sharak, I couldn't find the div class "price" anywhere within the code so I'll attach the file for you to look at... Look forward to your response! Moth product.tpl.zip Link to comment Share on other sites More sharing options...
Sharak Posted January 13, 2014 Share Posted January 13, 2014 You've upgraded shop to 1.5.6.1 but your theme files still use code specific for older version. I guess more bugs like that will come up in the future. I've found one already: http://shop.tatanaka.com/index.php?id_product=109&controller=product - price here is quite messed up. Below product price there seems to be price with tax but in fact what's being loaded here is "old_price" - the one before reduction. In my opinion upgrading from much older versions (1.3, 1.4, even some early 1.5) is meaningless. You'll have much more work trying to make your old theme match new shop than if you install completely new shop and import products one by one. But that's just my honest opinion 1 Link to comment Share on other sites More sharing options...
moth0027 Posted January 14, 2014 Share Posted January 14, 2014 Mmmmm... Okay. I guess deleting the products and adding them again with this theme unchanged won't make a difference. You mean starting with a new shop from scratch, customising the theme to match the old one and then adding the products again? Unfortunately I have no idea how to do that since I was initially only asked to manage their shop (adding new products etc...) - all the customisations happened before I started... I'll look into it. Fingers crossed! Thanks again! Link to comment Share on other sites More sharing options...
Sharak Posted January 14, 2014 Share Posted January 14, 2014 You mean starting with a new shop from scratch, customising the theme to match the old one and then adding the products again? Yes, exactly. If I were you I would wait till presta 1.6 stable arrive then hired someone to build the same looking theme from scratch. Meanwhile, as the shop is still operating we can try to work the price problem out. Starting in line 180 of your product.tpl you have this: {if !$priceDisplay || $priceDisplay == 2} {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, 2)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {elseif $priceDisplay == 1} {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, 2)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} {/if} In presta 1.5.6.1 this was moved to javascript. Differences are much more significant but maybe this will work. Delete above from your .tpl and add this starting on line 46 (is empty now): {if !isset($priceDisplayPrecision)} {assign var='priceDisplayPrecision' value=2} {/if} {if !$priceDisplay || $priceDisplay == 2} {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {elseif $priceDisplay == 1} {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} {/if} var productPriceWithoutReduction = '{$productPriceWithoutReduction}'; var productPrice = '{$productPrice}'; 1 Link to comment Share on other sites More sharing options...
moth0027 Posted January 14, 2014 Share Posted January 14, 2014 Wow! That totally worked! From a designer who doesn't know much about coding that was like witchcraft! Thanks again for all your help and I'll let the client know what you said about 1.6 especially considering there could potentially be even more problems down the line with their old theme. If you customise themes yourself I can put in a good word if you like!! All the best, Moth Link to comment Share on other sites More sharing options...
Recommended Posts