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

"Apply discount to Shipping Amount" disabled for "Fixed amount discount for whole cart" action #24422

Closed
drabikowy opened this issue Sep 3, 2019 · 23 comments
Labels
Component: Checkout Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@drabikowy
Copy link

Preconditions (*)

Reproduced on Magento 2.3-develop;

Steps to reproduce (*)

  1. Go to admin panel -> Marketing -> Cart Price Rules -> Add new rule
  2. In Actions tab and set Apply to "Fixed amount discount for whole cart"

Expected result (*)

I am able to turn ON "Apply to Shipping Amount" option in action tab.
It should be possible according to documentation (https://docs.magento.com/m2/ce/user_guide/marketing/price-rules-cart-create.html):

Fixed amount discount for whole cart:
Discounts the entire cart by subtracting a fixed amount from the cart total. For example: Enter 10 in Discount Amount to subtract $10 from the cart total.By default, the discount applies only to the cart subtotal. To apply the discount to the subtotal and shipping separately, see Apply to Shipping Amount.

Actual result (*)

"Apply to Shipping Amount" switcher Is disabled

@m2-assistant
Copy link

m2-assistant bot commented Sep 3, 2019

Hi @drabikowy. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@drabikowy do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Sep 3, 2019
@engcom-Bravo engcom-Bravo self-assigned this Sep 3, 2019
@m2-assistant
Copy link

m2-assistant bot commented Sep 3, 2019

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added Component: Checkout Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Sep 3, 2019
@ghost ghost unassigned engcom-Bravo Sep 3, 2019
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Sep 3, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Bravo
Thank you for verifying the issue. Based on the provided information internal tickets MC-19818 were created

Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@sudheers-kensium sudheers-kensium self-assigned this Sep 4, 2019
@m2-assistant
Copy link

m2-assistant bot commented Sep 4, 2019

Hi @sudheers-kensium. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@sudheers-kensium
Copy link
Contributor

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @sudheers-kensium. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @sudheers-kensium, here is your Magento instance.
Admin access: https://i-24422-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@webkul-deepak
Copy link

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @webkul-deepak. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @webkul-deepak, here is your Magento instance.
Admin access: https://i-24422-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@evilprophet
Copy link

I found that it was intentionally removed in version 2.2.9 and 2.3.2
Here is a related commit: 1b6d64c
It is a chance to restore this possibility in the future?

@drabikowy
Copy link
Author

Please give me more details regarding why this specific combination was disabled.
In mentioned commit there is just a note:
// Shouldn't be proceed according to MAGETWO-96403 but I believe this is an internal ticket.
I would like to know what issues I can expect when I will restore this option or if it will be fixed with the next release.

@ghost ghost unassigned sudheers-kensium Sep 29, 2019
@domi-nique
Copy link

Would be also interesting for us. It is a big problem because we are using this functionality in magento 1. Will it be fixed soon?

@justinharris1986
Copy link

Throwing my two cents in: This is also causing a problem for us. @magento-engcom-team any idea why this was included? Referencing internal tickets is useless to the community.

@sivaschenko
Copy link
Member

sivaschenko commented Jan 14, 2020

Issue MAGETWO-96403 was closed as NOT A BUG. Here is the description:

Discount for shipping amount does not applied in case of fixed amount discount for whole cart

Steps to reproduce:

  • Create product with price - $100
  • Create shipping with price - $5
  • Create cart rule with:
    -- Apply - Fixed amount discount for whole cart
    -- Discount amount - 1
    -- Apply to Shipping Amount - Yes
  • Add product to cart, select shipping and check totals

Actual result:

Subtotal	$100.00
Discount  -$1.00
Shipping (Flat Rate - Fixed)	$5.00
Order Total	$104.00

Expected result:
Discount should be applied separately for subtotal and shipping (THAT IS NOT CORRECT)

Subtotal	$100.00
Discount  -$2.00
Shipping (Flat Rate - Fixed)	$5.00
Order Total	$103.00

The issue is not a bug. "Apply to shipping" is designed for percentage discounts. Fixed discounts are applied correctly. - the documentation should be updated to clarify this case

justinharris1986 pushed a commit to justinharris1986/magento2 that referenced this issue Jan 14, 2020
justinharris1986 pushed a commit to justinharris1986/magento2 that referenced this issue Jan 15, 2020
justinharris1986 pushed a commit to justinharris1986/magento2 that referenced this issue Jan 15, 2020
justinharris1986 pushed a commit to justinharris1986/magento2 that referenced this issue Jan 15, 2020
@krzksz
Copy link
Contributor

krzksz commented Jan 15, 2020

@sivaschenko

The issue is not a bug. "Apply to shipping" is designed for percentage discounts. Fixed discounts are applied correctly. - the documentation should be updated to clarify this case
I'm sorry but I don't understand what are the next steps we can take now, can we revert the changes to restore this feature?

Currently (and it was possible before), there is no way to give coupons to clients which would apply to the whole amount, so the following scenario won't work:

Subtotal	$100.00
Coupon  -$150.00
Shipping (Flat Rate - Fixed)	$5.00
Order Total	$0

@drabikowy
Copy link
Author

@sivaschenko Your answer is not clear to me as well. The above example shows that this case should be covered like it was before.
We tried restoring the code which disabled this possibility but it seems then we have some tax calculation issues (what probably was considered in this commit 1b6d64c)

Our real example with this option restored looks like this:

Subtotal	10.50
Coupon  -17.56 (I set the cupon value to 20)
Shipping (Flat Rate - Fixed)	7.90
Order Total    0.74

@madhurajawat madhurajawat self-assigned this Jan 18, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jan 18, 2020

Hi @madhu-ranosys. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@TheFrakes
Copy link

So does that mean it will be fixed in 2.4 and we can use "apply discount to shipping amount" just like we could in 2.3.1?
grafik

@madhurajawat madhurajawat removed their assignment Jan 20, 2020
@sivaschenko
Copy link
Member

@krzksz @drabikowy Looks like the internal issue was describing a different scenario - double discount (that was identified as not a bug) - my comment was only sharing the requested internal issue description and decision.

I'd agree that an admin should be able to apply the fixed discount amount to shipping, however, looks like the expectation is that the fixed discount is applied to whole cart (including shipping) - that's why the "Apply to Shipping" switch may not be necessary.

If the fixed discount amount is not applying to shipping - my understanding - that is a bug and it should be fixed.

@tkacheva could you please take a look at this issue and confirm the expected result? Is that a switch and calculation issue or just calculation issue?

@drabikowy
Copy link
Author

@magento give me 2.3.3 instance

@magento-engcom-team
Copy link
Contributor

Hi @drabikowy. Thank you for your request. I'm working on Magento 2.3.3 instance for you

@magento-engcom-team
Copy link
Contributor

Hi @drabikowy.

Thank you for your report and collaboration!

The issue was fixed by Magento team. The fix was delivered into magento/magento2:2.4-develop branch(es).
Related commit(s):

The fix will be available with the upcoming 2.4.1 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Jun 2, 2020
@ghost ghost moved this from Ready for Dev to Done (last 30 days) in Community Backlog Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Checkout Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
No open projects
Community Backlog
  
Done (last 30 days)
Development

No branches or pull requests