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

[Core][Originator] Base on promotion codes instead of originator #5537

Conversation

Zales0123
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? yes
Related tickets
License MIT

As Promotions have now unique codes, there is no need to use separate service to determine origin of promotion (or any other adjustment).

@michalmarcinkowski
Copy link
Contributor

Looks good! 👍

Since we have adjustments applied on different levels, what do you think about adding one more scenario for item promotion?

@michalmarcinkowski michalmarcinkowski added Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.). BC Break PRs introducing BC breaks (do not even try to merge). Optimization labels Jul 19, 2016
@@ -93,6 +92,16 @@ public function isCredit();
*/
public function isLocked();

/**
* @return int
Copy link
Member

Choose a reason for hiding this comment

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

According to spec it should be string instead of int

@Zales0123
Copy link
Member Author

@michalmarcinkowski ok, I fact there is no possibility for such scenario 😄 we have now two types of unit promotions - fixed and percentage and both uses price range and taxon filter. Therefore, to revert promotion we should modify specific product taxon or price (!), which I think is not the point in this case ;)

@Zales0123 Zales0123 force-pushed the base-on-promotion-codes-not-on-originator branch from 7d0e728 to 5dbdda0 Compare July 20, 2016 07:15
@pjedrzejewski pjedrzejewski merged commit 40f2299 into Sylius:master Jul 20, 2016
@pjedrzejewski
Copy link
Member

🎆

@michalmarcinkowski
Copy link
Contributor

@Zales0123 there is possibility! 😄 We can use order promotion rule together with item promotion action, e.g.: Given the promotion gives 5% off on every product to every order with items total at least "€80.00"

@dantleech
Copy link
Contributor

This change couples adjustments to promotions? What if an adjustment is made by a non-promotion?

@dantleech
Copy link
Contributor

Hmm. Now I wonder if I should be using promotions ...

@michalmarcinkowski
Copy link
Contributor

It doesn't couple adjustments with promotions. Promotions just use originCode field from adjustment to be able to recognize them. Non promotion adjustments are not affected by this change (we already have also e.g. tax adjustments).

@dantleech
Copy link
Contributor

ok, yes I see now. so I can still reference something with the combination of the type and origin_code. Thanks :)

@Zales0123 Zales0123 deleted the base-on-promotion-codes-not-on-originator branch October 6, 2016 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC Break PRs introducing BC breaks (do not even try to merge). 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

5 participants