Added feature for adding standard product in cart

This commit is contained in:
Shreesh Arora
2025-02-26 11:07:31 +05:30
parent 950b37ed1c
commit ec23dbd4f3
98 changed files with 8153 additions and 3882 deletions

View File

@@ -478,14 +478,16 @@ class OrderDetailCore extends ObjectModel
/*
*By webkul so that product quantity will not be decreased when product is ordered
*/
/*$update_quantity = true;
if (!StockAvailable::dependsOnStock($product['id_product'])) {
$update_quantity = StockAvailable::updateQuantity($product['id_product'], $product['id_product_attribute'], -(int)$product['cart_quantity']);
}
if (!$product['booking_product']) {
$update_quantity = true;
if (!StockAvailable::dependsOnStock($product['id_product'])) {
$update_quantity = StockAvailable::updateQuantity($product['id_product'], $product['id_product_attribute'], -(int)$product['cart_quantity']);
}
if ($update_quantity) {
$product['stock_quantity'] -= $product['cart_quantity'];
}*/
if ($update_quantity) {
$product['stock_quantity'] -= $product['cart_quantity'];
}
}
if ($product['stock_quantity'] < 0 && Configuration::get('PS_STOCK_MANAGEMENT')) {
$this->outOfStock = true;