gabriel91g Posted April 17, 2013 Share Posted April 17, 2013 Hi everybody, I'm starting using Prestashop, but I'm trying to do a thing without success. I would like to display in the products list and in the product details page two prices: one without a discount (the original price) and the discounted price. Is there a way to do so? Can you explain me how? Thankyou all very much! Gabriel Link to comment Share on other sites More sharing options...
GoneVintage Posted April 17, 2013 Share Posted April 17, 2013 I would like to use this feature too. If there is someone with knowledge, please, share it Link to comment Share on other sites More sharing options...
vekia Posted April 17, 2013 Share Posted April 17, 2013 default template for product page shows two prices - with & without discount which version of ps you use? with default theme? Link to comment Share on other sites More sharing options...
gabriel91g Posted April 18, 2013 Author Share Posted April 18, 2013 default template for product page shows two prices - with & without discount which version of ps you use? with default theme? The version is 1.5 and we used a personalized template. But, how to set the price with and without the discount in the admin page? Link to comment Share on other sites More sharing options...
vekia Posted April 18, 2013 Share Posted April 18, 2013 {assign var='priceDisplayPrecision' value=2} {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} <span id="our_price_display">{convertPrice price=$productPrice}</span> <span id="price_without_reduction">{convertPrice price=$productPriceWithoutReduction}</span> this is for product page, but you can modify this for product-list also 1 Link to comment Share on other sites More sharing options...
gabriel91g Posted April 18, 2013 Author Share Posted April 18, 2013 (edited) These two lines go in the template? <span id="our_price_display">{convertPrice price=$productPrice}</span> <span id="price_without_reduction">{convertPrice price=$productPriceWithoutReduction}</span> These ones in which page? {assign var='priceDisplayPrecision' value=2} {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} Edited April 18, 2013 by vekia (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted April 18, 2013 Share Posted April 18, 2013 for the first you have to paste assign var's commands, somewhere above he <span> with prices 1 Link to comment Share on other sites More sharing options...
gabriel91g Posted April 18, 2013 Author Share Posted April 18, 2013 (edited) Ok, I tried to do so, but I get a blank page in "category" page if I left the var's commands. Maybe I forgot something? This is the product-list.tpl file: CODE HIDDEN Edited April 18, 2013 by gabriel91g (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted April 18, 2013 Share Posted April 18, 2013 i said that you need to make some changes in the code for the pages other than product.tpl anyway, does the code that i pasted work for product page? im checking product-list.tpl right now 1 Link to comment Share on other sites More sharing options...
gabriel91g Posted April 18, 2013 Author Share Posted April 18, 2013 (edited) i said that you need to make some changes in the code for the pages other than product.tpl anyway, does the code that i pasted work for product page? im checking product-list.tpl right now Here the product.tpl and it works: CODE HIDDEN I didn't used the code you wrote me in this page, I could try it if this can help you. Thank you again for your time. Edited April 18, 2013 by gabriel91g (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted April 18, 2013 Share Posted April 18, 2013 ok thanks for information that product.tpl works fine, you don't have to paste the code now im going to check how to display two prices in the product-list.tpl regards 1 Link to comment Share on other sites More sharing options...
vekia Posted April 18, 2013 Share Posted April 18, 2013 try to use: {convertPrice price=$product.price_without_reduction} 1 Link to comment Share on other sites More sharing options...
gabriel91g Posted April 18, 2013 Author Share Posted April 18, 2013 try to use: {convertPrice price=$product.price_without_reduction} You're awesome!! ThankYou very much!! Link to comment Share on other sites More sharing options...
vekia Posted April 18, 2013 Share Posted April 18, 2013 so i can go ahead and mark this thread as solved :-) regards! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now