daxit_x Posted February 2, 2016 Share Posted February 2, 2016 Hello I am using the latest Prestashop release 1.6.1.4, successfully updated from 1.6.1, this problems were present already in the original installation 1.6.1 I searched pretty much about this problem and found some information, unfortunately partially focused and none that could help to solve my problem I created group cart rules with conditions, a specific group can obtain a percentage discount depending on the quantity of one item. So far all works fine, the discounts set as percentage and in the cart everything is working properly, discounted price is shown correctly, adding the items the price is updated according to the table of quantity discounts that was set in the BO. E.g. the group of reseller buying 1 item in N categories get a X% discount, buying two pieces of the same item gets 2X% discount, buying 3 pieces of the same Item gets 3X% discounts etcetera.... The two problems I found are: 1) In the product page the table below the price that shows the new prices according to the quantities always the same original NOT discount price is shown in all rows, and the total saving is shown properly. 2) The new price is correctly shown in the upper part on the left, the old price is correctly shown as well just below, but adding items the new discounted price per item is NOT updated as it should E.g. A item which original price is 540€ is correctly shown to be discounted X% buying 1 piece, the label "instead of" shows correctly the original price, adding more items the new price corresponding to the discount for 2 pieces, or 3 pieces or N pieces is NOT shown. Below in the table showing the savings in each row is shown the quantity of items to get the discount, the fuull original price instead of the discounted original price and finally the correct saved amount if buying N articles according to the discounts awarded. To have visual idea of what happens please see the images: I tried to look into product.tpl in the section quantity discount, but I could not understand what to do, I am just too ignorant to modify this code by myself without looking at working samples etcetera. So far I tried to use the code from the default bootstrap, no changes what soever, exactly the same behaviour was observed, I tried to look into modifications done by other users but seems that actually there is none recent and no one worked for my case. I just would like to have the new price updated if the client add an item and the correct discounted price per item in table below, this would be perfectly enough. Here is the code from the quantity discount section in the product.tpl of my template ( I tried to substitute it with the default bootstrap template and apparently nothing changed, I reversed it before deeper test as anyway the problem was not solved and eventually other bugs could have been introduced in the template tpl file): {if !$content_only} {if (isset($quantity_discounts) && count($quantity_discounts) > 0)} <!-- quantity discount --> <section class="page-product-box"> <h3 class="page-product-heading">{l s='Volume discounts'}</h3> <div id="quantityDiscount"> <table class="std table-product-discounts"> <thead> <tr> <th>{l s='Quantity'}</th> <th>{if $display_discount_price}{l s='Price'}{else}{l s='Discount'}{/if}</th> <th>{l s='You Save'}</th> </tr> </thead> <tbody> {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'} {$realDiscountPrice=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval} {else} {$realDiscountPrice=$productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval} {/if} <tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}" data-real-discount-value="{convertPrice price = $realDiscountPrice}" data-discount-type="{$quantity_discount.reduction_type}" data-discount="{$quantity_discount.real_value|floatval}" data-discount-quantity="{$quantity_discount.quantity|intval}"> <td> {$quantity_discount.quantity|intval} </td> <td> {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'} {if $display_discount_price} {if $quantity_discount.reduction_tax == 0 && !$quantity_discount.price} {convertPrice price = $productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction_with_tax)|floatval} {else} {convertPrice price=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval} {/if} {else} {convertPrice price=$quantity_discount.real_value|floatval} {/if} {else} {if $display_discount_price} {if $quantity_discount.reduction_tax == 0} {convertPrice price = $productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction_with_tax)|floatval} {else} {convertPrice price = $productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval} {/if} {else} {$quantity_discount.real_value|floatval}% {/if} {/if} </td> <td> <span>{l s='Up to'}</span> {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'} {$discountPrice=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval} {else} {$discountPrice=$productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval} {/if} {$discountPrice=$discountPrice * $quantity_discount.quantity} {$qtyProductPrice=$productPriceWithoutReduction|floatval * $quantity_discount.quantity} {convertPrice price=$qtyProductPrice - $discountPrice} </td> </tr> {/foreach} </tbody> </table> </div> </section> {/if} Anyone have an idea on how to fix this simple problem? (not so simple for me obviously)? Thank you in advance Regards D. Link to comment Share on other sites More sharing options...
jot4m4n Posted February 4, 2016 Share Posted February 4, 2016 I have the same problem, is it possible that there is so much low stores using recent 1.6.1.x versions? Seems a very basic feature to me to leave unattended. Link to comment Share on other sites More sharing options...
Walrus Posted July 28, 2016 Share Posted July 28, 2016 I have two stores and noticed same problem on the product pages of the one using Prestashop 1.6.1.4. No fixes? Link to comment Share on other sites More sharing options...
Anurag Singh Posted September 30, 2016 Share Posted September 30, 2016 (edited) I have same problem, can someone help on this? Attached image for ref. Edited September 30, 2016 by Anurag Singh (see edit history) Link to comment Share on other sites More sharing options...
ballashop Posted March 21, 2017 Share Posted March 21, 2017 did you find solution? 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