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

Transparently replace promotion adjustments #39

Merged
merged 4 commits into from
Oct 13, 2023

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Oct 13, 2023

This is to support the migration of existing stores. After having migrated the promotion configuration, you can flip the switch, and old promotion system adjustments will be replaced by new promotion system adjustments.

...whether the old system created them, or the new system created them.
If you switch to this promotion system, we're assuming that you have all
your promotions migrated before you start using it. If that is the case,
with this change, `order.recalculate` will transparently replace old
promotion system adjustment with new promotion system adjustments.
We already have the promotion code on the join table between promotions
and orders. No need to also store it on the adjustment.
This iterates through all promo adjustments and tries to get their
eligibility through their source, which is really going through the
terrace door rather than the front door.
Copy link
Collaborator

@davecandlescience davecandlescience left a comment

Choose a reason for hiding this comment

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

I'm still not sure if I understand all of the downstream implications of this but definitely the right direction.

@mamhoff mamhoff merged commit c8ebb06 into main Oct 13, 2023
@mamhoff mamhoff deleted the override-adjustment-promotion branch October 13, 2023 20:52
mamhoff added a commit that referenced this pull request Jul 1, 2024
Transparently replace promotion adjustments
mamhoff added a commit that referenced this pull request Oct 25, 2024
Transparently replace promotion adjustments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants