Options Price
This commit is contained in:
parent
7d07439047
commit
5f902bd1a5
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user