[-] MO: Display real price instead of Free for product which are not gifts on blockcart #PSCFV-6423

This commit is contained in:
Rémi Gaillard
2013-02-05 18:25:40 +01:00
parent 604602a6b6
commit 73143db07f
5 changed files with 9 additions and 7 deletions
+1
View File
@@ -89,6 +89,7 @@ class BlockCart extends Module
foreach ($products as &$product)
if ($product['id_product'] == $cart_rule['gift_product'] && $product['id_product_attribute'] == $cart_rule['gift_product_attribute'])
{
$product['is_gift'] = 1;
$product['total_wt'] = Tools::ps_round($product['total_wt'] - $product['price_wt'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
$product['total'] = Tools::ps_round($product['total'] - $product['price'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
$cart_rule['value_real'] = Tools::ps_round($cart_rule['value_real'] - $product['price_wt'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);