community-features icon indicating copy to clipboard operation
community-features copied to clipboard

Magento does not track the amount of free shipping discount activated via coupon

Open atwixfirster opened this issue 5 years ago • 14 comments

Preconditions (*)

M2.3.3, 2.4-develop

  1. Create a new cart price rule: | Option | Value | | Rule Information > Coupon | Specific coupon | | Rule Information > Coupon Code | test10 | | Rule Information > Uses per Coupon | 100 | | Rule Information > Uses per Customer | 1 | | Conditions > Apply the rule only if the following conditions are met | Subtotal equals or greater than 25 | | Actions > Free Shipping | For shipment with matching items |

  2. Enable "Table Rate" shipping method. Set "Condition" to "Price vs. Destination" Create a CSV file with the next content:

USA,*,*,0.0000,15.0000
USA,*,*,50.0000,10.0000
USA,*,*,100.0000,5.0000
USA,AK,*,0.0000,20.0000
USA,AK,*,50.0000,15.0000
USA,AK,*,100.0000,10.0000
USA,HI,*,0.0000,20.0000
USA,HI,*,50.0000,15.0000
USA,HI,*,100.0000,10.0000

and import it:

09
  1. Create a test product with price $30.00

Steps to reproduce (*)

  1. Add your test product into shopping cart
  2. Go to Checkout
  3. On the Checkout Shipping step select shipping via "Table Rate"
01
  1. On the Checkout Payment step activate your coupon code
02

Expected result (*)

  1. Shipping amount is set to 0.00 (free shipping). There is an information about discount.

Per my opinion, we should display a discount which customer gets when a free shipping coupon is activated. So, in my test case, we should have a discount field with $-15.00:

06

Also, such discount information will be displayed in the Coupons Report:

07

Actual result (*)

  1. Shipping amount is set to 0.00 (free shipping). There is no information about discount:
04

Coupons Report also displays nothing but Free Shipping coupon has been activated and customer got -$15.00 (shipping rate) discount:

08

The root of issue is: when customer redeems a coupon which give him a free shipping then the merchant does not see the amount of discount which customer got. Shipping delivery may be a different for customer ($5.00, $50.00, etc). But it's impossible to verify how much money a free shipping coupon is saved for customer, for example $5.00 or $50.00. :)

atwixfirster avatar Dec 16 '19 10:12 atwixfirster

Hi @atwixfirster. 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.4-develop instance - upcoming 2.4.x release

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

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

  • [ ] yes
  • [ ] no

m2-assistant[bot] avatar Dec 16 '19 10:12 m2-assistant[bot]

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).

    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.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!

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

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

m2-assistant[bot] avatar Dec 16 '19 11:12 m2-assistant[bot]

@magento give me 2.4-develop instance

eduard13 avatar Dec 16 '19 13:12 eduard13

Hi @eduard13. Thank you for your request. I'm working on Magento 2.4-develop instance for you

magento-engcom-team avatar Dec 16 '19 13:12 magento-engcom-team

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

magento-engcom-team avatar Dec 16 '19 13:12 magento-engcom-team

Hello @atwixfirster

Could you provide more details for reproduce this issue? Please add version of magento.

Thank you!

engcom-Echo avatar Dec 16 '19 14:12 engcom-Echo

Hi, @engcom-Echo

Please add version of magento.

  • Magento 2.3.2
  • Magento 2.3.3

Also, it's reproducible in 2.4-develop.

The root of issue is: when customer redeems a coupon which give him a free shipping then the merchant does not see the amount of discount which customer got. Shipping delivery may be a different for customer ($5.00, $50.00, etc). But it's impossible to verify how much money a free shipping coupon is saved for customer, for example $5.00 or $50.00. :)

Thank you!

atwixfirster avatar Dec 16 '19 14:12 atwixfirster

Hello @atwixfirster

Could you add a screenshot of Table Rate settings and Origin Shipping Address?

Thanks!

engcom-Echo avatar Dec 16 '19 14:12 engcom-Echo

Could you add a screenshot of Table Rate settings and Origin Shipping Address?

My settings: please create a CSV file with the next content:

Country,Region/State,"Zip/Postal Code","Order Subtotal (and above)","Shipping Price"
USA,*,*,0.0000,15.0000
USA,*,*,50.0000,10.0000
USA,*,*,100.0000,5.0000
USA,AK,*,0.0000,20.0000
USA,AK,*,50.0000,15.0000
USA,AK,*,100.0000,10.0000
USA,HI,*,0.0000,20.0000
USA,HI,*,50.0000,15.0000
USA,HI,*,100.0000,10.0000

and import it:

09

Thanks

atwixfirster avatar Dec 16 '19 14:12 atwixfirster

:white_check_mark: Confirmed by @engcom-Echo Thank you for verifying the issue. Based on the provided information internal tickets MC-29802 were created

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

magento-engcom-team avatar Dec 16 '19 15:12 magento-engcom-team

@magento give me 2.3.3 instance

jayankaghosh avatar Dec 17 '19 08:12 jayankaghosh

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

magento-engcom-team avatar Dec 17 '19 08:12 magento-engcom-team

Hello @jayankaghosh,

Thank you for your report, you are right, currently it is not possible to verify how much money a free shipping coupon is saved for customer, but the initial idea of free shipping coupon does not imply that. I think we should not add a free shipping coupon discount as a sales discount into the coupons report, since free shipping is not a sales discount coupon it is separate marketing tool. Currently, we have both sales discount and free shipping coupons in a single report and merchants able to differentiate these types of coupons only by name and sales discount amount (which is 0 for free shipping ones). So, this looks to me like a feature request for adding a separate report for free shipping coupons where shipping discount is calculated. @sdzhepa, could you please help to move this ticket to the feature requests project?

chernenm-zz avatar Dec 19 '19 20:12 chernenm-zz

I just ran into this problem using the iWays Magento2 Payment Module and a configured cart promotion rule to give free shipping to customers over a specific subtotal.

The problem is the cost is never removed from the totals calculation (for example by copying the base_shipping_amount to shipping_discount_amount, but its uses just a flag called $shippingAddress->getFreeShipping().

I know that the issue stems from the payment module by not covering this case 100%, but i cant even blame it, it doesnt really make sense to set a switch for free shipping, but failing to recompute the totals.

Product costs 1000€ without tax, tax is 19%: image

Wrong Paypal Amount calculation: image

Internally it seems the normal shipping of 7.8€ is applied, and the amounts are off: image

marvinhinz avatar Oct 05 '24 23:10 marvinhinz