@cloudcommerce/app-discounts 2.44.0 → 2.44.3

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.
@@ -280,7 +280,14 @@ export default async ({ params, application }) => {
280
280
  return kitDiscount;
281
281
  });
282
282
  }
283
- const kitDiscounts = getValidDiscountRules(config.product_kit_discounts, params, params.items)
283
+ const itemsForKit = params.items.filter((item) => {
284
+ return !item.flags?.includes('freebie');
285
+ });
286
+ const kitDiscounts = getValidDiscountRules(
287
+ config.product_kit_discounts,
288
+ params,
289
+ itemsForKit,
290
+ )
284
291
  .sort((a, b) => {
285
292
  if (!Array.isArray(a.product_ids) || !a.product_ids.length) {
286
293
  if (Array.isArray(b.product_ids) && b.product_ids.length) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-discounts",
3
3
  "type": "module",
4
- "version": "2.44.0",
4
+ "version": "2.44.3",
5
5
  "description": "e-com.plus Cloud Commerce app for complex discount rules",
6
6
  "main": "lib/discounts.js",
7
7
  "files": [
@@ -23,10 +23,10 @@
23
23
  "homepage": "https://github.com/ecomplus/cloud-commerce/tree/main/packages/apps/discounts#readme",
24
24
  "dependencies": {
25
25
  "@ecomplus/utils": "1.5.0-rc.6",
26
- "@cloudcommerce/api": "2.44.0"
26
+ "@cloudcommerce/api": "2.44.3"
27
27
  },
28
28
  "devDependencies": {
29
- "@cloudcommerce/types": "2.44.0"
29
+ "@cloudcommerce/types": "2.44.3"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "bash ../../../scripts/build-lib.sh"