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

Coupons do NOT get applied on options #9

Closed
BreakSecurity opened this issue Dec 31, 2020 · 4 comments
Closed

Coupons do NOT get applied on options #9

BreakSecurity opened this issue Dec 31, 2020 · 4 comments

Comments

@BreakSecurity
Copy link
Contributor

Expected Behaviour
Once a discount coupon is applied, it should apply to the options as well.
Actual behaviour
After applying a discount restricted to only some products, the discount is applied to the menu items but not to any paid options.

Reproduce steps
Create a new coupon that applies a 10% discount to a limited number of items
immagine
immagine

Create an order by selecting one or more products to which the coupon can be applied.
As you can see, each product costs 2 euros as a base plus 2 euros as an addition; having selected 6, we are talking about 24 in total
immagine

By applying the coupon, a discount of 1.20 euros is applied; this is because the discount is applied only on the base price of the product (6 products of 2 euros, i.e. 12), and not on additions (which keep their price unchanged)
Below is an example of how the discount works
immagine

Additional informations
This does not seem to happen instead with discounts that apply to the entire cart without exception
Version
v.3.0.4-beta.25.2

@ryanmitchell
Copy link
Member

@sampoyigi I tried to look into this but cant figure out where the cartItem price is being calculated from...

@sampoyigi
Copy link
Member

See CartItem::price and CartItem::subtotal

@ryanmitchell
Copy link
Member

Added a PR here: tastyigniter/flame#26

@BreakSecurity
Copy link
Contributor Author

Thanks @ryanmitchell. Fixed!

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

No branches or pull requests

3 participants