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

Allow changing quantity for automatic line items #81

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Nov 8, 2023

This adds functionality to CreateDiscountedItems to become the full "Buy X get Y free" promotion. In the process, we add a way to change quantities from with the managing promotion action to managed line items.

@mamhoff mamhoff force-pushed the allow-updating-goodie-quantity branch 2 times, most recently from 7851d60 to b53ca47 Compare November 9, 2023 11:26
@mamhoff mamhoff marked this pull request as ready for review November 9, 2023 11:27
@mamhoff mamhoff force-pushed the allow-updating-goodie-quantity branch 4 times, most recently from 866152c to d859a3e Compare November 10, 2023 10:36
@mamhoff mamhoff changed the title Work in progress: Allow changing quantity for automatic line items Allow changing quantity for automatic line items Nov 10, 2023
@mamhoff mamhoff requested a review from tvdeyen November 10, 2023 10:37
When we do a buy-one-get-one-free promotion, you should get TWO free
when you buy two.

Ruby doesn't really allow changing methods based on who calls, so we
have to use the `quantity_setter` attr_accessor as a kind of lock that
unlocks setting the quantity when we want it.
There's two quantities we want to configure. Buy X get Y free...
@mamhoff mamhoff force-pushed the allow-updating-goodie-quantity branch from d859a3e to 3ea83fc Compare November 10, 2023 10:56
@tvdeyen tvdeyen merged commit 33d8b07 into main Nov 10, 2023
@tvdeyen tvdeyen deleted the allow-updating-goodie-quantity branch November 10, 2023 11:19
mamhoff pushed a commit that referenced this pull request Jul 1, 2024
Allow changing quantity for automatic line items
mamhoff pushed a commit that referenced this pull request Oct 25, 2024
Allow changing quantity for automatic line items
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.

None yet

2 participants