Skip to content

Commit

Permalink
Merge pull request PrestaShop#2924 from jeromenadaud/hotfix-PSCSX-5255
Browse files Browse the repository at this point in the history
[-] FO : FixBug #PSCSX-5255 - Quantity reduction now base on original pr...
  • Loading branch information
gRoussac committed Apr 29, 2015
2 parents 19d0cbc + 8913e34 commit 844a862
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions themes/default-bootstrap/js/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ function updatePrice()

// If there is a quantity discount table,
// we update it according to the new price
updateDiscountTable(priceWithDiscountsDisplay);
updateDiscountTable(basePriceDisplay);
}

//update display of the large image
Expand Down Expand Up @@ -848,7 +848,7 @@ function displayDiscounts(combination)
else if(allQuantityDiscount.length != 0)
{
allQuantityDiscount.show();
$('tr', quantityDiscountTable).not('#quantityDiscount_0').hide();
$('tbody tr', quantityDiscountTable).not('#quantityDiscount_0').hide();
quantityDiscountTable.show();
}
else
Expand Down
10 changes: 5 additions & 5 deletions themes/default-bootstrap/product.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,13 @@
<td>
{if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
{if $display_discount_price}
{convertPrice price=$productPrice|floatval-$quantity_discount.real_value|floatval}
{convertPrice price=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval}
{else}
{convertPrice price=$quantity_discount.real_value|floatval}
{/if}
{else}
{if $display_discount_price}
{convertPrice price = $productPrice|floatval-($productPrice*$quantity_discount.reduction)|floatval}
{convertPrice price = $productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval}
{else}
{$quantity_discount.real_value|floatval}%
{/if}
Expand All @@ -433,12 +433,12 @@
<td>
<span>{l s='Up to'}</span>
{if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
{$discountPrice=$productPrice|floatval-$quantity_discount.real_value|floatval}
{$discountPrice=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval}
{else}
{$discountPrice=$productPrice|floatval-($productPrice*$quantity_discount.reduction)|floatval}
{$discountPrice=$productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval}
{/if}
{$discountPrice=$discountPrice * $quantity_discount.quantity}
{$qtyProductPrice=$productPrice|floatval * $quantity_discount.quantity}
{$qtyProductPrice=$productPriceWithoutReduction|floatval * $quantity_discount.quantity}
{convertPrice price=$qtyProductPrice - $discountPrice}
</td>
</tr>
Expand Down

0 comments on commit 844a862

Please sign in to comment.