-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #13349 [CartPromotion][CatalogPromotion] Receiving discount o…
…nly on non discounted products (GSadee, SirDomin) This PR was merged into the 1.11-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Related tickets | based on #13328 | License | MIT <!-- - Bug fixes must be submitted against the 1.10 branch - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- 4413793 [CartPromotion][CatalogPromotion][Behat] Add scenarios for receiving discount only on non discounted products a65561e [CartPromotion][CatalogPromotion][Behat] Implement scenarios for receiving discount only on non discounted products 3556f47 [CartPromotion][CatalogPromotion][Behat] Fixes after rebase with changing the name of field 1f1e798 [CartPromotion][CatalogPromotion] Receiving discount only on non discounted products for unit cart promotions 372365b [WIP][CartPromotion][CatalogPromotion] Receiving discount only on non discounted products for fixed order cart promotions e735927 [CartPromotion] handle fixed and percentage order discount 9ce4cb8 [MinimumPrice][ApplyOnDiscounted] merge solutions for apply on discount and minimum prices
- Loading branch information
Showing
23 changed files
with
591 additions
and
49 deletions.
There are no files selected for viewing
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
44 changes: 44 additions & 0 deletions
44
...unt/receiving_fixed_discount_from_cart_promotions_only_on_non_discounted_products.feature
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@receiving_discount | ||
Feature: Receiving fixed discount from cart promotions only on non discounted products | ||
In order not to combine cart and catalog promotions | ||
As a Store Owner | ||
I want to apply discount only on products that are non discounted | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And the store has a product "Mug" priced at "$40.00" | ||
And the store has a product "T-Shirt" priced at "$20.00" | ||
And the store has a product "Cap" priced at "$10.00" | ||
And there is a catalog promotion "Winter sale" that reduces price by "25%" and applies on "T-Shirt" product | ||
|
||
@ui @api | ||
Scenario: Receiving product discount from cart promotions also on discounted products | ||
Given there is a promotion "Christmas sale" that applies to discounted products | ||
And this promotion gives "$10.00" off on every product priced between "$10.00" and "$50.00" | ||
When the customer adds "T-Shirt" product to the cart | ||
And the customer adds "Mug" product to the cart | ||
Then the product "T-Shirt" should have discounted unit price "$5.00" in the cart | ||
And the product "Mug" should have discounted unit price "$30.00" in the cart | ||
And my cart total should be "$35.00" | ||
|
||
@ui @api | ||
Scenario: Receiving product discount from cart promotions only on non discounted products | ||
Given there is a promotion "Christmas sale" that does not apply to discounted products | ||
And this promotion gives "$10.00" off on every product priced between "$10.00" and "$50.00" | ||
When the customer adds "T-Shirt" product to the cart | ||
And the customer adds "Mug" product to the cart | ||
Then the product "T-Shirt" should have discounted unit price "$15.00" in the cart | ||
And the product "Mug" should have discounted unit price "$30.00" in the cart | ||
And the cart total should be "$45.00" | ||
|
||
@api | ||
Scenario: Receiving order discount from cart promotions distributed only on non discounted products | ||
Given there is a promotion "Christmas sale" that does not apply to discounted products | ||
And this promotion gives "$10.00" discount to every order | ||
When the customer adds "T-Shirt" product to the cart | ||
And the customer adds "Mug" product to the cart | ||
And the customer adds "Cap" product to the cart | ||
Then the product "T-Shirt" should have discounted unit price "$15.00" in the cart | ||
And the product "Mug" should have total price "$32.00" in the cart | ||
And the product "Cap" should have total price "$8.00" in the cart | ||
And the cart total should be "$55.00" |
44 changes: 44 additions & 0 deletions
44
...eceiving_percentage_discount_from_cart_promotions_only_on_non_discounted_products.feature
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@receiving_discount | ||
Feature: Receiving percentage discount from cart promotions only on non discounted products | ||
In order not to combine cart and catalog promotions | ||
As a Store Owner | ||
I want to apply discount only on products that are non discounted | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And the store has a product "Mug" priced at "$40.00" | ||
And the store has a product "T-Shirt" priced at "$20.00" | ||
And the store has a product "Cap" priced at "$10.00" | ||
And there is a catalog promotion "Winter sale" that reduces price by "25%" and applies on "T-Shirt" product | ||
|
||
@ui @api | ||
Scenario: Receiving product discount from cart promotions also on discounted products | ||
Given there is a promotion "Christmas sale" that applies to discounted products | ||
And this promotion gives "50%" off on every product priced between "$10.00" and "$50.00" | ||
When the customer adds "T-Shirt" product to the cart | ||
And the customer adds "Mug" product to the cart | ||
Then the product "T-Shirt" should have discounted unit price "$7.50" in the cart | ||
And the product "Mug" should have discounted unit price "$20.00" in the cart | ||
And my cart total should be "$27.50" | ||
|
||
@ui @api | ||
Scenario: Receiving product discount from cart promotions only on non discounted products | ||
Given there is a promotion "Christmas sale" that does not apply to discounted products | ||
And this promotion gives "50%" off on every product priced between "$10.00" and "$50.00" | ||
When the customer adds "T-Shirt" product to the cart | ||
And the customer adds "Mug" product to the cart | ||
Then the product "T-Shirt" should have discounted unit price "$15.00" in the cart | ||
And the product "Mug" should have discounted unit price "$20.00" in the cart | ||
And the cart total should be "$35.00" | ||
|
||
@api | ||
Scenario: Receiving order discount from cart promotions distributed only on non discounted products | ||
Given there is a promotion "Christmas sale" that does not apply to discounted products | ||
And this promotion gives "50%" discount to every order | ||
When the customer adds "T-Shirt" product to the cart | ||
And the customer adds "Mug" product to the cart | ||
And the customer adds "Cap" product to the cart | ||
Then the product "T-Shirt" should have discounted unit price "$15.00" in the cart | ||
And the product "Mug" should have total price "$20.00" in the cart | ||
And the product "Cap" should have total price "$5.00" in the cart | ||
And the cart total should be "$40.00" |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.