Options Price

This commit is contained in:
Michael RICOIS 2017-11-28 16:53:20 +01:00
parent 7d07439047
commit 5f902bd1a5

View File

@ -352,15 +352,8 @@ class Product extends ProductCore
// Prix de l'option
$flatrate = true;
$priceImpact = 0;
if ($id_configurator != null) {
$sql = 'SELECT price FROM `'._DB_PREFIX_.'configurator_storage` WHERE id_configurator = '.(int)$id_configurator.
' AND id_product = '.(int)$id_product;
$priceResult = Db::getInstance()->executeS($sql);
if (count($priceResult) > 0) {
foreach($priceResult as $p) {
$priceImpact += $p['price'];
}
}
if ($id_configurator !== null) {
$priceImpact = self::getConfiguratorSelectedPriceTotal($id_product, $id_configurator);
if ($flatrate === true) {
$priceImpact = $priceImpact / $quantity;
}