Open Romz opened 3 years ago
Hi @Romz. Thank you for your report. To help us process this issue please make sure that you provided the following information:
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.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @engcom-Oscar. 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: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If 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.4-develop
branchDetails
- 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!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @Romz ! Thank you for your report.
Unfortunately, we are not able to reproduce the issue on a fresh 2.4-develop by following steps from this ticket.
Actual Result: :heavy_check_mark: Order summary before applying coupon: Order summary with discount after applying coupon:
Please recheck - may be you missed some details in issue description.
I found out that the issue is before the checkout step.
Here the steps to reproduce.
Result:
Subtotal: $22 Dicount: $30.33 Shipping (Flat Rate - Fixed): $10 Tax: $0.28
Order Total: 1.67
The when I do the checkout process and set my address, the problem gone.
Hi @engcom-Oscar engcom-Oscar
I tried to use my $100 coupon on $102 subtotal + $15 shipping and I have an odd result. Discount applied: $101.58 which is more than the amount on my coupon rule.
Hi @engcom-Echo. 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: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If 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.4-develop
branchDetails
- 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!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi Romz ,
The issue is not getting re-produced as per the steps provided . Requested you to kindly test the issue on latest version i.e. 2.4-develop, or provide further clarification to help us reproduce the issue.
Thanks
@magento give me 2.4-develop instance
Hi @4ctobias. Thank you for your request. I'm working on Magento instance for you.
Hi @4ctobias, here is your Magento Instance: https://d0f456901f993a68b3e51efd011f9f03-2-4-develop.instances.magento-community.engineering Admin access: https://d0f456901f993a68b3e51efd011f9f03-2-4-develop.instances.magento-community.engineering/admin_f20c Login: b68fb7d6 Password: f7a07f47c010
@magento give me 2.4.2-p1 instance
Hi @4ctobias. Thank you for your request. I'm working on Magento instance for you.
Hi @4ctobias, here is your Magento Instance: https://d0f456901f993a68b3e51efd011f9f03-2-4-2-p1.instances.magento-community.engineering Admin access: https://d0f456901f993a68b3e51efd011f9f03-2-4-2-p1.instances.magento-community.engineering/admin_5d6b Login: ef714261 Password: c3ffe9397d48
Hi,
I am fully able to reproduce this with the upcoming 2.4-develop as well. It depends on the following settings (its a typical European set up - as we have to provide gross prices for products, services and shipping for customers B2C):
Now I added a product for 28$ and go to the cart page ("Edit and review cart")
I expect a order total value of 0.00 $.
As I have a Tax rate of 19 % the 0.80 order total is exactly the tax of the shipping rate (5 $ gross, 4.20 net).
If I apply this 50 $ coupon to a cart with a value more than 50 $ all works fine and is correct - so it seems that the tax of the shipping is not used correctly when using a fixed coupon if the cart value is less than this maximum discount value.
Best,
Tobias
For a quick/hot fix I have overriden the Magento\SalesRule\Model\Validator (with a preference-for in a di.xml). Within the processShippingAmount() I changed the processing within the \Magento\SalesRule\Model\Rule::CART_FIXED_ACTION-handling in the switch. I changed from
if ($cartRules[$rule->getId()] > 0) {
$shippingAmount = $address->getShippingAmount() - $address->getShippingDiscountAmount();
...
to
if ($cartRules[$rule->getId()] > 0) {
// Fix: Manual fix to respect shipping VAT if the possible fixed coupon value is > subtotal + shipping
if ($rule->getDiscountAmount() + $shippingAmount-$address->getShippingAmount() < $address->getSubtotalInclTax() + $shippingAmount) {
$shippingAmount = $address->getShippingAmount() - $address->getShippingDiscountAmount();
}
...
Its not a clean solution:
But as a short and quick solution (until the issue is solved by itself) this will work.
Hi @engcom-November. 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: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If 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.4-develop
branchDetails
- 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!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Verified the issue on Magento 2.4-develop branch and the issue is reproducible on 2.4-develop branch having EE and B2B modules installed. Steps performed:
Checkout page: No issue
Note: This issue is observed even for configuration: Stores -> Configuration -> Sales -> Tax -> "Apply Customer Tax" to "After Discount" as well.
:white_check_mark: Confirmed by @engcom-November
Thank you for verifying the issue. Based on the provided information internal tickets MC-42852
were created
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@magento give me 2.4-develop instance
Hi @Thundar. Thank you for your request. I'm working on Magento instance for you.
Hi @Thundar, here is your Magento Instance: https://d0f456901f993a68b3e51efd011f9f03-2-4-develop.instances.magento-community.engineering Admin access: https://d0f456901f993a68b3e51efd011f9f03-2-4-develop.instances.magento-community.engineering/admin_532b Login: cc06d6a0 Password: 18d8b5349234
Hello,
facing same problem on 2.4.4 on catalog inc taxes (same configuration as start topic) Discount code configuration (50€ fixed values for whole cart with "Apply to Shipping Amount")
please provide fix or any hints for fixing
Exact same issue in 2.4.3-p2, please provide the fix. Thanks a lot.
@timbaltissen @4ctobias ,
Have you found a solution for 2.4.5?
Preconditions (*)
Magento 2.4.2 2.4-develop having EE and B2B Modules
Steps to reproduce (*)
Using Fresh magento installation with samples datas.
Expected result (*)
Actual result (*)
The discount seems to be only applied on Shipping amount excluding tax. In that case 4.17$. That's explain the -55.17$ discount amount on shopping cart (51 + 4.17)
For more details about the issue and configuration, please check this link
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.