From f5a192e27ec2395c9b8337e5294b270bf89983a2 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Tue, 10 Jul 2012 09:09:15 +0000 Subject: [PATCH] [-] FO: fix display of quantity discount prices git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16299 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/front/ProductController.php | 2 +- themes/default/product.tpl | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 34b908522..6f85d75ad 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -543,7 +543,7 @@ class ProductControllerCore extends FrontController foreach ($specific_prices as $key => &$row) { $row['quantity'] = &$row['from_quantity']; - if ($row['price'] != 0) // The price may be directly set + if ($row['price'] >= 0) // The price may be directly set { $cur_price = (Product::$_taxCalculationMethod == PS_TAX_EXC ? $row['price'] : $row['price'] * (1 + $tax_rate / 100)); diff --git a/themes/default/product.tpl b/themes/default/product.tpl index 28e8ab337..6b4e50369 100644 --- a/themes/default/product.tpl +++ b/themes/default/product.tpl @@ -467,9 +467,6 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus - - {l s='There is not any quantity discount for this product.'} - {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} @@ -481,7 +478,7 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus {$quantity_discount.quantity|intval} - {if $quantity_discount.price != 0 OR $quantity_discount.reduction_type == 'amount'} + {if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'} -{convertPrice price=$quantity_discount.real_value|floatval} {else} -{$quantity_discount.real_value|floatval}%