foodbot-cart-calculations 1.0.60 → 1.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/functions/promotionCalculation.js +3 -1
- package/package.json +1 -1
- package/sample.json +3336 -399
|
@@ -147,7 +147,9 @@ function getCategorySpeificOffer(carts, offer) {
|
|
|
147
147
|
if(!res.purchase_points){
|
|
148
148
|
let itemId = res.item_id?.toString().length > 10 ? res.item_id : parseInt(res.item_id);
|
|
149
149
|
if (!res.event && (offer.offer_discount_type == 'manual' || (offer.offer_products.offer_discount_products.includes(itemId) && res.isPackage == 0) || (offer.offer_products.package_items.includes(itemId) && res.isPackage == 1))) {
|
|
150
|
-
|
|
150
|
+
// let ItemPriceWithMod = res.item_price_with_modifier ? res.item_price_with_modifier : (res.item_price || res.item_cost)
|
|
151
|
+
let ItemPriceWithMod = res.item_price_with_modifier ?? res.item_price ?? res.item_cost;
|
|
152
|
+
foundItemsSum = foundItemsSum + ItemPriceWithMod * res.quantity
|
|
151
153
|
return foundItemsSum
|
|
152
154
|
}
|
|
153
155
|
}
|
package/package.json
CHANGED