malcek Posted April 26, 2013 Share Posted April 26, 2013 Hi I try to get solution on how to display on product listing these information OLD PRICE -> REDUCTION (AMOUNT OR %) -> NEW PRICE have anybody done this? I realy need help with that ... Martin ps. I attached picture how it should look like Link to comment Share on other sites More sharing options...
PascalVG Posted April 27, 2013 Share Posted April 27, 2013 What version do you use? If 1.5, just go to your product, go to price-TAB, add a specific price with discount in %. It will show the original price, the reduction (say 10%) and the final price. Or is your question to get the special layout, precisely as in your picture, not how to display the three values at all? Let us know, Pascal Link to comment Share on other sites More sharing options...
malcek Posted April 27, 2013 Author Share Posted April 27, 2013 (edited) my store running on 1.4.9.0. I need exact layout as I shown in picture. http://www.trgovina-figura.si/85-dvodelne-kopalke#/page-4 here you can see Edited April 27, 2013 by malcek (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted April 27, 2013 Share Posted April 27, 2013 For display, you can play in themes/<your theme folder>/css/product.css for example like this (PS 1.5.3.1 default theme) #buy_block p#old_price { font-size: 14px; text-align: left; <-- add this, to move old price to the left } #reduction_amount { position: relative; <-- add these two line to move the % to the middle left: -120px; <--- display: block; float: right; margin-left: 10px; padding: 0 0 0 10px; font-weight: 700; font-size: 12px; color: #fff; background: url(../img/bg_reduction.png) no-repeat 0 0 transparent; } .our_price_display { top: 25px; <-- add this to move the final price down to align with the other ones position: relative; padding-bottom: 10px; font-weight: 700; position: relative; font-size: 24px; line-height: 18px; color: #9b0000; position: relative; } Just a sample for what's possible. Hope this helps, Pascal Link to comment Share on other sites More sharing options...
PascalVG Posted April 27, 2013 Share Posted April 27, 2013 On your sample page you gave before, I don't see any discounted price on your site yet. Did you give in the product a discounted price already? Link to comment Share on other sites More sharing options...
malcek Posted April 27, 2013 Author Share Posted April 27, 2013 On product page the old price and new price are shown. I want to shown on product list page. Now there is shown only new price. All product with discount showing on right side of picture tekst SPLETNA CENA in orange color. thanks Martin Link to comment Share on other sites More sharing options...
PascalVG Posted April 28, 2013 Share Posted April 28, 2013 hmm, I don't have the 1.4.9 code here, so that is difficult, but for sure this given in themes/<your theme folder>/product-list.tpl in 1.5.3.1 you have a piece of code like this: (search for the red code in your file) <span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span> Here you should add some code to show the full price, discount % and then the discounted price... I think I found it: (Thanks to other reply from NikPraskaton) Add BEFORE the code found above this piece of red code: {if $product.price_without_reduction neq $product.price} <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else}{displayWtPrice p=((($product.price_without_reduction) / (1 + ((($product.rate|intval) / 100)|floatval)))|floatval)}{/if}</span> {if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices} {if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))} (-{$pro_specific_prices.reduction * 100|floatval}%) {/if} {/if} {/if} <span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span> This will add the full price and the reduction% within brackets. Please add and see if it works. We may have to work on the layout a little afterwards, but add the values first, so we can play with it. Hope this does the trick. Let me know... Pascal 2 Link to comment Share on other sites More sharing options...
PascalVG Posted April 28, 2013 Share Posted April 28, 2013 Small edit: I put the full price within the test for reduction (otherwise you sometimes get full price, final price without any reduction shown) So, replace red code above with this: {if $product.price_without_reduction gt $product.price} {if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices} {if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))} <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else}{displayWtPrice p=((($product.price_without_reduction) / (1 + ((($product.rate|intval) / 100)|floatval)))|floatval)}{/if}</span> (-{$pro_specific_prices.reduction * 100|floatval}%) {/if} {/if} {/if} 1 Link to comment Share on other sites More sharing options...
malcek Posted April 28, 2013 Author Share Posted April 28, 2013 HI, IT worked fine, but if you follow the link http://www.trgovina-figura.si/96-outlet-trgovina#/page-4 you notice that half on product are displayed correctly , half of them not. I'm a little bit confused why is that. All product have thicked ON SALE so it should be the same condtition. I also change some css ... Martin Link to comment Share on other sites More sharing options...
PascalVG Posted April 29, 2013 Share Posted April 29, 2013 hmm, code checks the following conditions: 1) Full price smaller than reduced price, AND 2) if there is a special price for this product, AND 3) If the reduction type = percentage AND 4a) discount date FROM == discount date TO (i.e. until) (This means no end date-> indefinite discount) OR 4b1) current date <= discount date TO (i.e.until) AND (This means current date inside discount valid date interval) 4b2) current date >= discount date FROM can you check if these conditions are met for the non-showing products? Link to comment Share on other sites More sharing options...
malcek Posted April 29, 2013 Author Share Posted April 29, 2013 Hi thanks for all your help. Here wht I found out: if I have any date selected, then the old prices and reduction are not shown. After I delete dates It show both prices and reduction. Martin Link to comment Share on other sites More sharing options...
PascalVG Posted April 29, 2013 Share Posted April 29, 2013 Can you check one thing for me? Does it work if you put a FROM date before today, and a TO date say next week? (So today should be a discount day) Does deleting the date work for you? Or do we need to have another look what we can improve? Link to comment Share on other sites More sharing options...
malcek Posted April 29, 2013 Author Share Posted April 29, 2013 (edited) Hi if i set both dates it works fine, if only start date or end date is set it won't work. without date it also work fine... Best regards, Martin Edited April 29, 2013 by malcek (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted April 29, 2013 Share Posted April 29, 2013 That sounds good to me. Shall we mark this question solved? :-) Good luck with your shop! Pascal Link to comment Share on other sites More sharing options...
malcek Posted April 29, 2013 Author Share Posted April 29, 2013 Thank you for the help. I'll make nessessery changes to the dates and it will work.. WE can mark this as SOLVED (you aready did that ) Now the only thing remain thing I have to do with my Prestashop store is to sucsessfuly upgrade from 1.4.9.0. to latest version.... till now no luck.. If you know somebody that colud help with that? Martin Link to comment Share on other sites More sharing options...
Barb Posted May 3, 2013 Share Posted May 3, 2013 Hello I also used this code, and it works. Thanks alot! Do you know what to write in css to get a line-through on the old price on productlist? I tried with this one, but it doesn't work: ul#product_list li .old_price{ font-size:1.0em; text-decoration:line-through; } Regards, Elisa Link to comment Share on other sites More sharing options...
malcek Posted May 3, 2013 Author Share Posted May 3, 2013 Hi search in global.css (around line 606) .price-discount { font-size: 12px; text-decoration: line-through; Link to comment Share on other sites More sharing options...
Barb Posted May 3, 2013 Share Posted May 3, 2013 Thank you very much.. It works for me Link to comment Share on other sites More sharing options...
RockyRocks Posted May 30, 2013 Share Posted May 30, 2013 hey, PascalVG...you rocked...its helped me a lot...... Link to comment Share on other sites More sharing options...
PascalVG Posted May 30, 2013 Share Posted May 30, 2013 Hi Rocky, glad it was of any help. :-) Good luck with your shop! (Give us your URL so we can have a look what everyone is doing with their shops :-) ) pascal Link to comment Share on other sites More sharing options...
klemen130 Posted June 13, 2013 Share Posted June 13, 2013 Hi Pascal, how to show price before reduction in featured products (front office)- using lof featured product module? Now is showing only reduction price ( special offer), but I want to have both prices( of course I have price before reduction enebled) http://www.be-xtreme.eu/shoppresta1/index.php Any idea to solve? Thanks a lot for help. Best regards Klemen Link to comment Share on other sites More sharing options...
PascalVG Posted June 14, 2013 Share Posted June 14, 2013 Hi Klemen, Unfortunately, I don't have the lof module code, so that's hard to say... I might imagine, some code similar to the code mentioned above should be added close to the current discounted price code in the lof file, but as said, I don't have the code here... pascal Link to comment Share on other sites More sharing options...
Velocity Posted July 20, 2013 Share Posted July 20, 2013 The solution given in this thread works like a charm in product-list and home-featured, and it requires only a couple of lines of code: http://www.prestashop.com/forums/topic/146924-how-to-show-before-discount-price-in-product-list/ Link to comment Share on other sites More sharing options...
[email protected] Posted August 23, 2013 Share Posted August 23, 2013 Small edit: I put the full price within the test for reduction (otherwise you sometimes get full price, final price without any reduction shown) So, replace red code above with this: {if $product.price_without_reduction gt $product.price} {if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices} {if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))} <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else}{displayWtPrice p=((($product.price_without_reduction) / (1 + ((($product.rate|intval) / 100)|floatval)))|floatval)}{/if}</span> (-{$pro_specific_prices.reduction * 100|floatval}%) {/if} {/if} {/if} Thank you Pascal! worked like magic! www.sperpat.co.id Link to comment Share on other sites More sharing options...
PascalVG Posted August 23, 2013 Share Posted August 23, 2013 Hi Glen, Glad it's useful for you! Happy selling, pascal Link to comment Share on other sites More sharing options...
mouse1 Posted August 31, 2013 Share Posted August 31, 2013 (edited) Thank you so much PascalVG. The code works great!! I only adjusted it a little for my purpose. I'm including more detailed instructions of my modifications. The attached picture shows what my reduced prices look like (take it just as an example as it's still a testing version of my new shop).I'm using Prestashop 1.5.4.0.1) Open themes/default/product-list.tpl and find the following code: <div class="content_price"> 2) Add the following code bellow the above mentioned code:{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>{/if} {if $product.price_without_reduction gt $product.price} {if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices} {if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))} <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else}{displayWtPrice p=((($product.price_without_reduction) / (1 + ((($product.rate|intval) / 100)|floatval)))|floatval)}{/if}</span> <span class="percent"> (-{$pro_specific_prices.reduction * 100|floatval}%) </span> {/if} {/if} {/if} <br> 3) Open your theme css file and edit values in brackets to look something similar to this (depending on your layout) #product_list li .content_price {float:left;margin:84px 0 0; width: 220px; line-height: 18px; display: inline} 4) Still in your theme css, add the following :#product_list li .price-discount{text-decoration: line-through; vertical-align: top;} #product_list li .percent{vertical-align: top;} (price-discount is your price before reduction, percent is the percentage of your discount - you can adjust these to suit your needs, e.g. change color, font, text decoration etc.)That's it. :-) Edited September 23, 2013 by mouse1 (see edit history) 1 Link to comment Share on other sites More sharing options...
vankata.be Posted September 22, 2013 Share Posted September 22, 2013 (edited) Hi Pascal. Could you help us with this issue as well? http://www.prestashop.com/forums/topic/232200-reduced-prices-wrong-discount-calulation-prices-drop/?view=findpost&p=1389133 It is again connected with discounts... Thank you in advance. Edited September 22, 2013 by vankata.be (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted September 25, 2013 Share Posted September 25, 2013 Hi vankata, Do I see correctly that you found the solution to your problem already? Let me know, pascal. Link to comment Share on other sites More sharing options...
ps3z Posted October 5, 2013 Share Posted October 5, 2013 hi pascal my theme is not showing amount discounts in product page,its just showing the percentage,how i can show old price in strikeout with automatic percentage if its possible how i can solve it? http://www.worldbazaar.com.tr/tr/ps3-oyun/pes-2013-turkce-ps3-oyun.html Link to comment Share on other sites More sharing options...
PascalVG Posted October 5, 2013 Share Posted October 5, 2013 Ps3z In my example in post number 8, I show how To make an - Old price (striked-through) - reduction percentage/Amount, - New price. http://www.prestashop.com/forums/topic/242926-solved-product-list-showing-old-price-reduction-new-price/?view=findpost&p=1203766 What exactly do you want to show? Pascal Link to comment Share on other sites More sharing options...
ps3z Posted October 5, 2013 Share Posted October 5, 2013 (edited) Ps3z In my example in post number 8, I show how To make an - Old price (striked-through) - reduction percentage/Amount, - New price. http://www.prestashop.com/forums/topic/242926-solved-product-list-showing-old-price-reduction-new-price/?view=findpost&p=1203766 What exactly do you want to show? Pascal i would to show like this 100-50 =50tl %50 discounted. but i will specify old price and discounted last price and percentage will be automatic calculated. http://screencast.com/t/8GOzBxWKRvgU Edited October 5, 2013 by ps3z (see edit history) Link to comment Share on other sites More sharing options...
ps3z Posted October 5, 2013 Share Posted October 5, 2013 Pascal which codes i have to replace or add? i would to show in product page ,can you type to here ? Link to comment Share on other sites More sharing options...
PascalVG Posted October 5, 2013 Share Posted October 5, 2013 (edited) Do I understand right, that you give your discount as a fixed amount, not a percentage, and you want to CALCULATE the percentage? if so, probably something like this: {if $product.price_without_reduction gt $product.price}{if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices}{if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))} <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else}{displayWtPrice p=((($product.price_without_reduction) / (1 + ((($product.rate|intval) / 100)|floatval)))|floatval)}{/if}</span><span class="reduction_amount"> - {$pro_specific_prices.reduction)}</span> <span class ="calculated_percentage_reduction"> (-{($pro_specific_prices.reduction|floatval / $product.price_without_reduction|floatval) * 100|floatval}%) {/if}{/if}{/if} Didn't try it, but probably something like that. Let me know if it works, pascal Edited October 5, 2013 by PascalVG (see edit history) Link to comment Share on other sites More sharing options...
ps3z Posted October 6, 2013 Share Posted October 6, 2013 (edited) Do I understand right, that you give your discount as a fixed amount, not a percentage, and you want to CALCULATE the percentage? if so, probably something like this: {if $product.price_without_reduction gt $product.price} {if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices} {if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))} <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else}{displayWtPrice p=((($product.price_without_reduction) / (1 + ((($product.rate|intval) / 100)|floatval)))|floatval)}{/if}</span> <span class="reduction_amount"> - {$pro_specific_prices.reduction)}</span> <span class ="calculated_percentage_reduction"> (-{($pro_specific_prices.reduction|floatval / $product.price_without_reduction|floatval) * 100|floatval}%) {/if} {/if} {/if} Didn't try it, but probably something like that. Let me know if it works, pascal which line i should add this codes? or i need to replace existing code? http://pastebin.com/gz9TfW5s http://www.worldbazaar.com.tr/tr/ps3-oyun/pes-2013-turkce-ps3-oyun.html Edited October 6, 2013 by ps3z (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted October 6, 2013 Share Posted October 6, 2013 Hi ps3z, see post #7 Link to comment Share on other sites More sharing options...
ps3z Posted October 7, 2013 Share Posted October 7, 2013 Hi ps3z, see post #7 i solved thanks! Link to comment Share on other sites More sharing options...
infinityl Posted November 27, 2013 Share Posted November 27, 2013 Nice! Thanks Link to comment Share on other sites More sharing options...
Caballo Renoir Posted February 5, 2014 Share Posted February 5, 2014 Thank you so much PascalVG. The code works great!! I only adjusted it a little for my purpose. I'm including more detailed instructions of my modifications. The attached picture shows what my reduced prices look like (take it just as an example as it's still a testing version of my new shop). I'm using Prestashop 1.5.4.0. 1) Open themes/default/product-list.tpl and find the following code: <div class="content_price">2) Add the following code bellow the above mentioned code: {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>{/if} {if $product.price_without_reduction gt $product.price} {if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices} {if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))} <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else}{displayWtPrice p=((($product.price_without_reduction) / (1 + ((($product.rate|intval) / 100)|floatval)))|floatval)}{/if}</span> <span class="percent"> (-{$pro_specific_prices.reduction * 100|floatval}%) </span> {/if} {/if} {/if} <br>3) Open your theme css file and edit values in brackets to look something similar to this (depending on your layout) #product_list li .content_price {float:left;margin:84px 0 0; width: 220px; line-height: 18px; display: inline}4) Still in your theme css, add the following : #product_list li .price-discount{text-decoration: line-through; vertical-align: top;} #product_list li .percent{vertical-align: top;}(price-discount is your price before reduction, percent is the percentage of your discount - you can adjust these to suit your needs, e.g. change color, font, text decoration etc.) That's it. :-) REALLY REALLY NICE!!! Now I can see the old price and percentage in category view!! THANKS!! One big question now, I see this only works when applied a percentage discount, what can I do to see the old price when apply a discount of amount?? Link to comment Share on other sites More sharing options...
PascalVG Posted February 8, 2014 Share Posted February 8, 2014 (edited) Hi Caballo, Didn't test it, but probably something like this: {if $pro_specific_prices.reduction_type eq 'amount' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))}<span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else} {displayWtPrice p=($pro_specific_prices.reduction|floatval)} {/if}</span><span class="amount">(-{$pro_specific_prices.reduction * 100|floatval}%) </span>{/if} Hope this does the trick. let me know, pascal. Edited February 8, 2014 by PascalVG Added missing ) (see edit history) Link to comment Share on other sites More sharing options...
klopotnik Posted February 12, 2014 Share Posted February 12, 2014 does it work for you even if you are logged as an user? not working for me Link to comment Share on other sites More sharing options...
klopotnik Posted February 12, 2014 Share Posted February 12, 2014 does it work for you even if you are logged as an user? not working for me additional info: logged as test company user with prices without tax.. Link to comment Share on other sites More sharing options...
mouse1 Posted February 12, 2014 Share Posted February 12, 2014 does it work for you even if you are logged as an user? not working for me I do not use amount discounts, only percentage and they work for me even when logged in as a user. Link to comment Share on other sites More sharing options...
sbt Posted August 10, 2014 Share Posted August 10, 2014 Ps3z In my example in post number 8, I show how To make an - Old price (striked-through) - reduction percentage/Amount, - New price. http://www.prestashop.com/forums/topic/242926-solved-product-list-showing-old-price-reduction-new-price/?view=findpost&p=1203766 What exactly do you want to show? Pascal Hi Pascal, I am using PS1.6.0.9, fresh installation, default theme and I would like to show the price like you said above in product-list.tpl page. Currently, it shows the percentage correctly, but not the amount. Please see the attachment no show.jpg. What I want is, please see attachment good.jpg I checked product-list.tpl and found the following code, seems "amount" reduction is missing. {if $product.specific_prices.reduction_type == 'percentage'} <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span> {/if} Would you please help to show me what code is needed and where to put in? Thanks Kent 1 Link to comment Share on other sites More sharing options...
Guest Posted November 4, 2014 Share Posted November 4, 2014 I don't even have the discount labels... can someone help me? Link to comment Share on other sites More sharing options...
totallighting.sk Posted March 28, 2015 Share Posted March 28, 2015 REALLY REALLY NICE!!! Now I can see the old price and percentage in category view!! THANKS!! One big question now, I see this only works when applied a percentage discount, what can I do to see the old price when apply a discount of amount?? Great, it works on PS1562!!! Link to comment Share on other sites More sharing options...
athanikos Posted June 15, 2015 Share Posted June 15, 2015 Hello guys, is there any chance to show the benefit price for customers in any currency? I use 1.6.0.5. The product list shows the old price, the final price and the discount. Thanks in advance! Link to comment Share on other sites More sharing options...
Mr.Bean_S Posted July 9, 2015 Share Posted July 9, 2015 (edited) hmm, I don't have the 1.4.9 code here, so that is difficult, but for sure this given in themes/<your theme folder>/product-list.tpl in 1.5.3.1 you have a piece of code like this: (search for the red code in your file) <span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span> Here you should add some code to show the full price, discount % and then the discounted price... I think I found it: (Thanks to other reply from NikPraskaton) Add BEFORE the code found above this piece of red code: {if $product.price_without_reduction neq $product.price} <span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$product.price_without_reduction}{else}{displayWtPrice p=((($product.price_without_reduction) / (1 + ((($product.rate|intval) / 100)|floatval)))|floatval)}{/if}</span> {if $product.specific_prices}{assign var='pro_specific_prices' value=$product.specific_prices} {if $pro_specific_prices.reduction_type eq 'percentage' && ($pro_specific_prices.from eq $pro_specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $pro_specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $pro_specific_prices.from))} (-{$pro_specific_prices.reduction * 100|floatval}%) {/if} {/if} {/if} <span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span> This will add the full price and the reduction% within brackets. Please add and see if it works. We may have to work on the layout a little afterwards, but add the values first, so we can play with it. Hope this does the trick. Let me know... Pascal Hello Pascal! I'm using PS 1.6.0.9 and a link to the product is this one: http://webshop.bean-bag.se/sittsackar-for-utomhusbruk/76-x5-1200d-beige-komplett-till-ombud.html In my product-list.tpl I have the following code: (There was no "span class="price"" to be found in that file so I assumed it's this part? {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} <span itemprop="price" class="price product-price"> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} </span> <meta itemprop="priceCurrency" content="{$currency->iso_code}" /> {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} {hook h="displayProductPriceBlock" product=$product type="old_price"} <span class="old-price product-price"> {displayWtPrice p=$product.price_without_reduction} </span> {if $product.specific_prices.reduction_type == 'percentage'} <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span> {/if} {/if} {hook h="displayProductPriceBlock" product=$product type="price"} {hook h="displayProductPriceBlock" product=$product type="unit_price"} {/if} </div> {/if} {if isset($product.new) && $product.new == 1} =============================================== I have a "pack" product that is just 15 SEK cheaper than buying the product as two separate items. What I want is to reduce prices further when they buy more than one. Say I want total discount to be 5% when they order 2 pcs, 10% when they buy 3 and 15% when they order 4 etc. If I make price rules for this customers DO get this discount in the cart but I want them to see the discounts (and unit prices) directly when they change quantity on the product page. In the cart they can't even see that they got a discount unless they take total price and divide this by the quatity they ordered. Well, they can't see the discount but how low the price was each. To get the discount they need to do further calculations. What I found out was that EVERYTHING worked great if I started the discount allready on 1 item. Then the discount shows just like it should. However, it does not change when I change amount ordered and I DON'T want any discount when they just buy ONE. Hope you understand and can find a solution. BTW, it's the same for normal products so it's NOT a "pack" issue. Regards, Johan in Sweden Edited July 9, 2015 by Mr.Bean_S (see edit history) Link to comment Share on other sites More sharing options...
Mr.Bean_S Posted July 9, 2015 Share Posted July 9, 2015 Oh, I forgot!If you scroll down on that product page you can see the discounts but I would like them in both places and I wouldn't mind if the one on the bottom showed both unit save AND total save. Have not checked if the discount appear on the product lines on the order or if they just show the end price. Anyone know? Link to comment Share on other sites More sharing options...
klemen130 Posted July 23, 2015 Share Posted July 23, 2015 Hi Pascal, great, it works for me, exapt sometimes at some products shows 2 same prices instead just one- basicly is just original price and no other. I can't figure it out why is that? Do you maybe have any idea? http://www.be-xtreme.eu/shop/index.php?id_category=6&controller=category&id_lang=1 (second row- first product) Thanks a lot for reply. Klemen 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