, , OrderDetail::create, OrderDetail::checkProductStock, StockAvailable::updateQuantity
$update_quantity = StockAvailable::updateQuantity(...
,
if (!StockAvailable::dependsOnStock($product['id_product']))
true, .
, , true, .
override/classes/stock/StockAvailable.php
class StockAvailable extends StockAvailableCore
{
public static function dependsOnStock($id_product, $id_shop = null)
{
$no_quantity_update = isset($GLOBALS['no_quantity_update']) && $GLOBALS['no_quantity_update'];
if ($no_quantity_update)
return true;
else return parent::dependsOnStock($id_product, $id_shop = null);
}
}
, cache/class_index.php,
:
$GLOBALS['no_quantity_update'] = false;
$this->module->validateOrder($cart->id, Configuration...
$GLOBALS['no_quantity_update'] = true;
$this->module->validateOrder($cart->id, Configuration...
,