fix price

This commit is contained in:
Marion Muszynski 2016-07-28 13:35:24 +02:00
parent 2fe135dbce
commit 854d8fe6f0

View File

@ -385,7 +385,7 @@ class Criteo_bbb extends Module
}
$product_obj = new Product((int)$product['id_product']);
$price = $product_obj->getPrice(true, ($product['id_product_attribute'] ? $product['id_product_attribute'] : (int)Product::getDefaultAttribute($product_obj->id)), 2);
$product_result[$products_sales[(int) $product['id_product']]]['price'] += $price * (int) $product['quantity'];
$product_result[$products_sales[(int) $product['id_product']]]['price'] += $price;
$product_result[$products_sales[(int) $product['id_product']]]['quantity'] += (int) $product['quantity'];
unset($product_obj);
}
@ -470,7 +470,7 @@ class Criteo_bbb extends Module
}
$product_obj = new Product((int)$product['id_product']);
$price = $product_obj->getPrice(true, ($product['id_product_attribute'] ? $product['id_product_attribute'] : (int)Product::getDefaultAttribute($product_obj->id)), 2);
$product_result[$products_sales[$product['id_product']]]['price'] += $price * (int) $product['quantity'];
$product_result[$products_sales[$product['id_product']]]['price'] += $price;
$product_result[$products_sales[$product['id_product']]]['quantity'] += (int) $product['quantity'];
unset($product_obj);
}