-
-
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 #13325 [CatalogPromotion][API][UI] Fixed discount action (GSa…
…dee) 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 | | License | MIT <!-- - Bug fixes must be submitted against the 1.9 or 1.10 branch (the lowest possible) - 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 ------- 1c4685d [CatalogPromotion][Behat] Add scenarios for new fixed discount action 71ce649 [CatalogPromotion][API] Creating and editing catalog promotions with new fixed discount action 45dc8e3 [CatalogPromotion][UI] Creating and editing catalog promotions with new fixed discount action b5458fa [CatalogPromotion][API][UI] Add validation for new fixed discount action 7bcb012 [CatalogPromotion][API][UI] Apply new fixed discount action on catalog 3e957b6 [CatalogPromotion][Documentation] Add new fixed discount action to actions reference ca72095 [CatalogPromotion] Add missing license docblocks 32f4ca5 [CatalogPromotion] Fix editing catalog promotion by changing its action e9a57c7 [CatalogPromotion] Minor refactor of fixed discount action ddc21f9 [CatalogPromotion][UI] Fix changing type of scope 969595a [CatalogPromotion] Fixes after rebasing with exclusive promotions feature
- Loading branch information
Showing
57 changed files
with
1,744 additions
and
151 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
23 changes: 0 additions & 23 deletions
23
...otion/applying_catalog_promotions/applying_all_available_types_catalog_promotions.feature
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
...on/applying_catalog_promotions/applying_all_available_types_of_catalog_promotions.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,23 @@ | ||
@applying_catalog_promotions | ||
Feature: Applying all available types of catalog promotions | ||
In order to see products in best prices | ||
As a Customer | ||
I want to see discounted products in the catalog | ||
|
||
Background: | ||
Given the store operates on a channel named "Web-US" | ||
And the store classifies its products as "Clothes" | ||
And the store has a "T-Shirt" configurable product | ||
And this product belongs to "Clothes" | ||
And this product has "PHP T-Shirt" variant priced at "$100.00" in "Web-US" channel | ||
And there is a catalog promotion "PHP sale" that reduces price by "10%" and applies on "PHP T-Shirt" variant | ||
And there is a catalog promotion "T-Shirt sale" that reduces price by "10%" and applies on "T-Shirt" product | ||
And there is a catalog promotion "Clothes sale" that reduces price by "10%" and applies on "Clothes" taxon | ||
And there is a catalog promotion "Fixed PHP sale" that reduces price by fixed "$5.00" in the "Web-US" channel and applies on "PHP T-Shirt" variant | ||
And there is a catalog promotion "Fixed T-Shirt sale" that reduces price by fixed "$5.00" in the "Web-US" channel and applies on "T-Shirt" product | ||
And there is a catalog promotion "Fixed Clothes sale" that reduces price by fixed "$5.00" in the "Web-US" channel and applies on "Clothes" taxon | ||
|
||
@api @ui | ||
Scenario: Applying multiple catalog promotions | ||
When I view "PHP T-Shirt" variant of the "T-Shirt" product | ||
Then I should see this variant is discounted from "$100.00" to "$57.90" with 6 promotions |
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
28 changes: 28 additions & 0 deletions
28
...pplying_catalog_promotions/applying_catalog_promotions_with_fixed_discount_action.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,28 @@ | ||
@applying_catalog_promotions | ||
Feature: Applying catalog promotions with fixed discount action | ||
In order to be attracted to specific products | ||
As a Visitor | ||
I want to see discounted products in the catalog | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And the store has a "T-Shirt" configurable product | ||
And this product has "PHP T-Shirt" variant priced at "$20.00" | ||
And this product has "Java T-Shirt" variant priced at "$30.00" | ||
And there is a catalog promotion "Winter sale" that reduces price by fixed "$10.00" in the "United States" channel and applies on "T-Shirt" product | ||
|
||
@api @ui | ||
Scenario: Applying simple catalog promotion | ||
When I view "PHP T-Shirt" variant of the "T-Shirt" product | ||
Then I should see this variant is discounted from "$20.00" to "$10.00" with "Winter sale" promotion | ||
|
||
@api @ui @javascript | ||
Scenario: Applying simple catalog promotion on another variant | ||
When I view "Java T-Shirt" variant of the "T-Shirt" product | ||
Then I should see this variant is discounted from "$30.00" to "$20.00" with "Winter sale" promotion | ||
|
||
@api @ui | ||
Scenario: Applying multiple catalog promotions | ||
Given there is a catalog promotion "Christmas sale" that reduces price by fixed "$5.00" in the "United States" channel and applies on "PHP T-Shirt" variant | ||
When I view "PHP T-Shirt" variant of the "T-Shirt" product | ||
Then I should see this variant is discounted from "$20.00" to "$5.00" with "Winter sale" and "Christmas sale" promotions |
23 changes: 0 additions & 23 deletions
23
...motion/applying_catalog_promotions/applying_catalog_promotions_with_minimum_price.feature
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
...log_promotions/applying_catalog_promotions_with_taking_minimum_price_into_account.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,30 @@ | ||
@applying_catalog_promotions | ||
Feature: Applying catalog promotions with taking minimum price into account | ||
In order to avoid too much discount applied on product | ||
As a Visitor | ||
I want to see discounted products in the catalog up to minimum price | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And the store has a "T-Shirt" configurable product | ||
And this product has "PHP T-Shirt" variant priced at "$20.00" | ||
And the "PHP T-Shirt" variant has minimum price of "$15.00" in the "United States" channel | ||
|
||
@api @ui | ||
Scenario: Applying percentage discount up to minimum price | ||
Given there is a catalog promotion "Winter sale" that reduces price by "80%" and applies on "PHP T-Shirt" variant | ||
When I view "PHP T-Shirt" variant of the "T-Shirt" product | ||
Then I should see this variant is discounted from "$20.00" to "$15.00" with "Winter sale" promotion | ||
|
||
@api @ui | ||
Scenario: Applying fixed discount up to minimum price | ||
Given there is a catalog promotion "Winter sale" that reduces price by fixed "$10.00" in the "United States" channel and applies on "PHP T-Shirt" variant | ||
When I view "PHP T-Shirt" variant of the "T-Shirt" product | ||
Then I should see this variant is discounted from "$20.00" to "$15.00" with "Winter sale" promotion | ||
|
||
@api @ui | ||
Scenario: Not applying promotion if product is priced on same price as its minimum price | ||
Given there is a catalog promotion "Winter sale" that reduces price by "80%" and applies on "PHP T-Shirt" variant | ||
And there is a catalog promotion "T-shirt Sale" that reduces price by "40%" and applies on "PHP T-Shirt" variant | ||
When I view "PHP T-Shirt" variant of the "T-Shirt" product | ||
Then I should see this variant is discounted from "$20.00" to "$15.00" with only "Winter sale" promotion |
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.