You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: Not reapplying catalog promotions on variants once the product’s taxon changes
3
+
In order to have proper discounts in product catalog
4
+
As a Store Owner
5
+
I do not want to have discounts reapplied on variants once the product’s taxon changes if the catalog promotion criteria are not met
6
+
7
+
Background:
8
+
Given the store operates on a channel named "Web-US" with hostname "web-us"
9
+
And the store classifies its products as "Clothes", "Shirts" and "Dishes"
10
+
And the store has a "T-Shirt" configurable product
11
+
And this product belongs to "Clothes"
12
+
And this product has "PHP T-Shirt" variant priced at "$100.00"
13
+
And it is "2022-01-01" now
14
+
And there is a catalog promotion "Winter sale" between "2021-12-20" and "2021-12-30" available in "Web-US" channel that reduces price by "30%" and applies on "Clothes" taxon
15
+
And there is another catalog promotion "Spring sale" between "2022-04-01" and "2022-05-01" available in "Web-US" channel that reduces price by "25%" and applies on "Shirts" taxon
16
+
And there is disabled catalog promotion "Surprise sale" between "2021-07-01" and "2022-05-04" available in "Web-US" channel that reduces price by "90%" and applies on "Dishes" taxon
17
+
And I am logged in as an administrator
18
+
19
+
@ui
20
+
Scenario: Changing products taxon to taxon with scheduled catalog promotion
21
+
When I change that the "T-Shirt" product does not belong to the "Clothes" taxon
22
+
And I change that the "T-Shirt" product belongs to the "Shirts" taxon
23
+
Then the visitor should see that the "PHP T-Shirt" variant is not discounted
24
+
And the visitor should still see "$100.00" as the price of the "T-Shirt" product in the "Web-US" channel
25
+
26
+
@ui
27
+
Scenario: Changing products taxon to taxon with disabled catalog promotion
28
+
When I change that the "T-Shirt" product does not belong to the "Clothes" taxon
29
+
And I change that the "T-Shirt" product belongs to the "Dishes" taxon
30
+
Then the visitor should see that the "PHP T-Shirt" variant is not discounted
31
+
And the visitor should still see "$100.00" as the price of the "T-Shirt" product in the "Web-US" channel
Copy file name to clipboardExpand all lines: src/Sylius/Behat/Context/Setup/CatalogPromotionContext.php
+60-1Lines changed: 60 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -461,6 +461,65 @@ public function thereIsAnotherCatalogPromotionAvailableInChannelsThatReducesPric
461
461
$this->entityManager->flush();
462
462
}
463
463
464
+
/**
465
+
* @Given /^there is (?:a|another) catalog promotion "([^"]*)" between "([^"]+)" and "([^"]+)" available in ("[^"]+" channel) that reduces price by ("[^"]+") and applies on ("[^"]+" taxon)$/
* @Given /^there is disabled catalog promotion "([^"]*)" between "([^"]+)" and "([^"]+)" available in ("[^"]+" channel) that reduces price by ("[^"]+") and applies on ("[^"]+" taxon)$/
0 commit comments