Skip to content

Commit

Permalink
Merge pull request #1662 from spryker-shop/hakathon/feature/cc-34976-…
Browse files Browse the repository at this point in the history
…discount-improvements-product-offer-reference

Auto-merge based on green CI result.
  • Loading branch information
spryker-release-bot authored Dec 13, 2024
2 parents 10728a9 + 3fc123a commit 0122680
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 125 deletions.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@
"spryker/merchant-commission-gui": "^1.0.0",
"spryker/merchant-commission-gui-extension": "^1.0.0",
"spryker/merchant-data-import": "^0.5.0",
"spryker/merchant-discount-connector": "^1.0.0",
"spryker/merchant-extension": "^1.0.0",
"spryker/merchant-gui": "^3.7.0",
"spryker/merchant-gui-extension": "^1.0.0",
Expand Down Expand Up @@ -910,6 +911,7 @@
"spryker/product-offer-availabilities-rest-api": "^1.0.0",
"spryker/product-offer-availability": "^1.0.0",
"spryker/product-offer-availability-storage": "^1.0.0",
"spryker/product-offer-discount-connector": "^1.0.0",
"spryker/product-offer-extension": "^1.0.0",
"spryker/product-offer-gui": "^1.0.0",
"spryker/product-offer-gui-extension": "^1.0.0",
Expand Down
283 changes: 187 additions & 96 deletions composer.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions data/import/common/AT/discount_store.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ discount_6,AT
discount_7,AT
discount_8,AT
discount_17,AT
discount_18,AT
discount_19,AT
discount_20,AT
3 changes: 3 additions & 0 deletions data/import/common/DE/discount_store.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ discount_6,DE
discount_7,DE
discount_8,DE
discount_17,DE
discount_18,DE
discount_19,DE
discount_20,DE
3 changes: 3 additions & 0 deletions data/import/common/common/discount.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ discount_14,Free Acer M2610 product,"For every purchase above $600, you get this
discount_15,20% off cameras products,20% off all digital cameras in the store,2000,PLUGIN_CALCULATOR_PERCENTAGE,1,100,0,2021-10-11 00:00:00,2026-10-11 11:59:00,,category IS IN 'digital-cameras',cart_rule,,
discount_16,Free mobile phone,"Buy any laptop, get a free mobile phone (select mobile phones only)",10000,PLUGIN_CALCULATOR_PERCENTAGE,1,100,0,2021-10-11 00:00:00,2026-10-11 11:59:00,category IS IN 'notebooks',,cart_rule,"068, 069, 051, 052, 045, 046, 047, 048",1
discount_17,5% for the first order,"5% for the first order of a logged-in customer",500,PLUGIN_CALCULATOR_PERCENTAGE,0,300,0,2021-10-11 00:00:00,2026-10-11 11:59:00,customer-order-count = '0',"sku = ""*""",cart_rule,,
discount_18,50% off for Sony NEX-VG20EH,Get a 50% exclusive discount for Sony NEX-VG20EH from the merchant Sony Experts,5000,PLUGIN_CALCULATOR_PERCENTAGE,0,400,0,2021-10-11 00:00:00,2036-10-11 11:59:00,"product-offer-reference = ""offer358""",product-offer-reference = 'offer358',cart_rule,,
discount_19,5% if sold by Spryker,5% off all products and offers of merchant Spryker,500,PLUGIN_CALCULATOR_PERCENTAGE,0,100,0,2021-10-11 00:00:00,2026-10-11 11:59:00,merchant-reference IS IN 'MER000001',merchant-reference IS IN 'MER000001',cart_rule,,
discount_20,10% if sold by Spryker and €500+,10% off all products and offers of merchant Spryker if order value is more than €500,1000,PLUGIN_CALCULATOR_PERCENTAGE,0,100,0,2021-10-11 00:00:00,2026-10-11 11:59:00,(currency = 'CHF' AND sub-total >= '515') OR (currency = 'EUR' AND sub-total >= '500'),merchant-reference IS IN 'MER000001',cart_rule,,
59 changes: 31 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"ts-node": "~10.9.1",
"tslib": "~2.6.2",
"typescript": "~5.4.2",
"webpack": "~5.88.2",
"webpack": "~5.94.0",
"webpack-merge": "~5.10.0"
},
"overrides": {
Expand Down
8 changes: 8 additions & 0 deletions src/Pyz/Zed/Discount/DiscountDependencyProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@
use Spryker\Zed\DiscountPromotion\Communication\Plugin\Discount\PromotionCollectedDiscountGroupingStrategyPlugin;
use Spryker\Zed\GiftCard\Communication\Plugin\GiftCardDiscountableItemFilterPlugin;
use Spryker\Zed\Kernel\Communication\Form\FormTypeInterface;
use Spryker\Zed\MerchantDiscountConnector\Communication\Plugin\Discount\MerchantReferenceDecisionRulePlugin;
use Spryker\Zed\MerchantDiscountConnector\Communication\Plugin\Discount\MerchantReferenceDiscountableItemCollectorPlugin;
use Spryker\Zed\MoneyGui\Communication\Plugin\Form\MoneyCollectionFormTypePlugin;
use Spryker\Zed\ProductDiscountConnector\Communication\Plugin\Collector\ProductAttributeCollectorPlugin;
use Spryker\Zed\ProductDiscountConnector\Communication\Plugin\DecisionRule\ProductAttributeDecisionRulePlugin;
use Spryker\Zed\ProductLabelDiscountConnector\Communication\Plugin\Discount\ProductLabelDiscountableItemCollectorPlugin;
use Spryker\Zed\ProductLabelDiscountConnector\Communication\Plugin\Discount\ProductLabelListDecisionRulePlugin;
use Spryker\Zed\ProductOfferDiscountConnector\Communication\Plugin\Discount\ProductOfferReferenceDecisionRulePlugin;
use Spryker\Zed\ProductOfferDiscountConnector\Communication\Plugin\Discount\ProductOfferReferenceDiscountableItemCollectorPlugin;
use Spryker\Zed\SalesDiscountConnector\Communication\Plugin\Discount\CustomerOrderCountDecisionRulePlugin;
use Spryker\Zed\SalesQuantity\Communication\Plugin\DiscountExtension\NonSplittableDiscountableItemTransformerStrategyPlugin;
use Spryker\Zed\ShipmentDiscountConnector\Communication\Plugin\DecisionRule\ShipmentCarrierDecisionRulePlugin;
Expand All @@ -56,6 +60,8 @@ protected function getDecisionRulePlugins(): array
new ProductAttributeDecisionRulePlugin(),
new CategoryDecisionRulePlugin(),
new CustomerOrderCountDecisionRulePlugin(),
new ProductOfferReferenceDecisionRulePlugin(),
new MerchantReferenceDecisionRulePlugin(),
]);
}

Expand All @@ -71,6 +77,8 @@ protected function getCollectorPlugins(): array
new ItemByShipmentPricePlugin(),
new ProductAttributeCollectorPlugin(),
new CategoryDiscountableItemCollectorPlugin(),
new ProductOfferReferenceDiscountableItemCollectorPlugin(),
new MerchantReferenceDiscountableItemCollectorPlugin(),
]);
}

Expand Down

0 comments on commit 0122680

Please sign in to comment.