GomX Posted November 5, 2009 Share Posted November 5, 2009 Hello everyone, I'm new to prestashop and I found a problem that i don't know how to solve it. I would also quantity discounts, instead of showing the percentage of discount, show me the specific price once the discount applied, ie if I have a product that costs 100 € and for 20 units you there is a 15 % off, show me the price for one unit, ie i want to show 85 € instead of 15%. Can someone help me, please.? Thank you, Link to comment Share on other sites More sharing options...
wayne Posted November 5, 2009 Share Posted November 5, 2009 I had the same problem.The way that I got around it was to make up my own price break chart as seen in the attached file.you should be able to go here: http://michaelmason.ca/prestashop/product.php?id_product=11copy and paste the chart into your back office in the 2nd area as shown in "presta price break back office.jpg"I hope this helps.Wayne Link to comment Share on other sites More sharing options...
GomX Posted November 5, 2009 Author Share Posted November 5, 2009 Thank you Wayne, is good idea, but i don't like it at all.I hope someone help you and me. :-) regards, Link to comment Share on other sites More sharing options...
rocky Posted November 6, 2009 Share Posted November 6, 2009 Modify line 315 of product.tpl in your theme's directory and change: -{$quantity_discount.value|floatval}% to: {if !$priceDisplay || $priceDisplay == 2}{assign var='price' value=$product->getPrice(true, $smarty.const.NULL, 2)}{else}{assign var='price' value=$product->getPrice(false, $smarty.const.NULL, 2)}{/if}{math assign='discount' equation='x * y/100' x=$price y=$quantity_discount.value|floatval}{convertPrice price=$price-$discount} Link to comment Share on other sites More sharing options...
GomX Posted November 6, 2009 Author Share Posted November 6, 2009 Hi Rocky,Perfect, this solution is very impresive.Thank you very much.Regards, Link to comment Share on other sites More sharing options...
petete2008 Posted January 14, 2010 Share Posted January 14, 2010 He entrado en la carpeta translations y no veo la equivalencia en la traducción para que traduzca la linea{l s='quantities'}¿Donde se encuentra el texto quantities? Link to comment Share on other sites More sharing options...
petete2008 Posted January 14, 2010 Share Posted January 14, 2010 He modificado el codigo para que el listado de descuentos aparezcan por filas.Tendremos tres columnas llamadas : Cantidad, Descuento y Precio Neto Unidad > {if $quantity_discounts} <!-- quantity discount --> </pre> <ul> {l s='Quantity discount'} </ul> <br><div> {l s='Cantidad'}{l s='Descuento'}{l s='Precio neto unidad'} {$quantity_discount.quantity|intval} {if $quantity_discount.quantity|intval > 1} {l s='unidades'} {else} {l s='unidad'} {/if} {if $quantity_discount.id_discount_type|intval == 1} {$quantity_discount.value|floatval}% {else} {convertPrice price=$quantity_discount.value|floatval} {/if} {if $quantity_discount.id_discount_type|intval == 1} {if !$priceDisplay || $priceDisplay == 2} {assign var='price' value=$product->getPrice(true, $smarty.const.NULL, 2)} {else} {assign var='price' value=$product->getPrice(false, $smarty.const.NULL, 2)} {/if} {math assign='discount' equation='x * y/100' x=$price y=$quantity_discount.value|floatval} {convertPrice price=$price-$discount}/unidad {else} {if !$priceDisplay || $priceDisplay == 2} {assign var='price' value=$product->getPrice(true, $smarty.const.NULL, 2)} {else} {assign var='price' value=$product->getPrice(false, $smarty.const.NULL, 2)} {/if} {math assign='discount' equation='x - y' x=$price y=$quantity_discount.value|floatval} {convertPrice price=$discount}/unidad {/if} </div> <br>{/if}<br NO funciona cuando tenemos atributos en el artículo que hacen que varíe el precio de venta.¿Alguien sabe cómo sería la modificación?Gracias Link to comment Share on other sites More sharing options...
jeroendielemans Posted April 8, 2010 Share Posted April 8, 2010 Sorry, I don't understand that last post! Don't speak or read any Spanish or whatever that is...Thanks for this solution, works fine BUT I would like to move the icon of currency to the front instead of after the amount.Is that possible, and how do I do it? Link to comment Share on other sites More sharing options...
ahmadsajid Posted December 25, 2010 Share Posted December 25, 2010 Modify line 315 of product.tpl in your theme's directory and change:-{$quantity_discount.value|floatval}% to: {if !$priceDisplay || $priceDisplay == 2}{assign var='price' value=$product->getPrice(true, $smarty.const.NULL, 2)}{else}{assign var='price' value=$product->getPrice(false, $smarty.const.NULL, 2)}{/if}{math assign='discount' equation='x * y/100' x=$price y=$quantity_discount.value|floatval}{convertPrice price=$price-$discount} Hello Rocky,thanks for the code, but it is not working for me. I'm posting my code here, after changing the code to you r solution. perhaps you can tell me, what I'm doing wrong? {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} {if !$priceDisplay || $priceDisplay == 2}{assign var='price' value=$product->getPrice(true, $smarty.const.NULL, 2)}{else}{assign var='price' value=$product->getPrice(false, $smarty.const.NULL, 2)}{/if}{math assign='discount' equation='x * y/100' x=$price y=$quantity_discount.value|floatval}{convertPrice price=$price-$discount} {/foreach} Thanks again for the help. 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