Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Behat][Promotion] Discount based on cart quantity #4257

Merged

Conversation

Zales0123
Copy link
Member

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Fixed tickets
License MIT
Doc PR

Based on #4249.
There is few things done in this PR connected with implementation of receiving_discount_based_on_cart_quantity feature:

  • implementation of custom RuleFactory - as it have been done with ActionFactory but already in proper namespace
  • added new promotions-checking step definition - changed my cart promotions to my discount, changes in other scenarios will be done in separate PR
  • set CartQuantityRuleChecker to always check >= condition - this change should be done for all checkers and it will be proposed and explained in separate PR

Scenario: Receiving discount when buying more than required quantity
Given the promotion gives "€10.00" fixed discount to every cart with quantity at least 3
Given the promotion gives "€10.00" fixed discount to every order with quantity at least 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cart is correct, why changing this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to be consistent with previously implemented steps. There is already step "And it gives "€10.00" fixed discount to every order". Do you think cart is more correct and it should be changed in previous steps?

@pjedrzejewski
Copy link
Member

Requires rebasing. Thanks!

@Zales0123 Zales0123 force-pushed the discount-based-on-cart-quantity branch from eadc7c3 to 5fef96c Compare February 23, 2016 07:32
@pjedrzejewski pjedrzejewski added the Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.). label Feb 23, 2016
pjedrzejewski pushed a commit that referenced this pull request Feb 23, 2016
[Behat][Promotion] Discount based on cart quantity
@pjedrzejewski pjedrzejewski merged commit 30d6e46 into Sylius:master Feb 23, 2016
@pjedrzejewski
Copy link
Member

Thanks Mateusz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants