Created
March 4, 2022 05:52
-
-
Save goodwoor/10c81393a131913d0c2ad4e2b295d939 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/addons/product_bundles/src/Services/ProductBundleService.php b/app/addons/product_bundles/src/Services/ProductBundleService.php | |
index 48d86c718e..11994b86ef 100644 | |
--- a/app/addons/product_bundles/src/Services/ProductBundleService.php | |
+++ b/app/addons/product_bundles/src/Services/ProductBundleService.php | |
@@ -313,9 +313,10 @@ class ProductBundleService | |
'get_discounts' => true | |
]); | |
+ $is_warehouse_active = Registry::get('addons.warehouses.status') === ObjectStatuses::ACTIVE; | |
if (!empty($bundle_product['product_options'])) { | |
$product['amount'] = isset($product['inventory_amount']) ? $product['inventory_amount'] : $product['amount']; | |
- } else { | |
+ } elseif(!$is_warehouse_active) { | |
$product['amount'] = fn_get_product_amount($bundle_product['product_id']); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment