magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

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

Open atwixfirster opened 4 years ago

atwixfirster commented 4 years ago

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:

<img width="1414" alt="09" src="https://user-images.githubusercontent.com/13585327/70916706-cdb00d80-2024-11ea-8061-a809c5e0a9fc.png">

3. Create a test product with price $30.00

### Steps to reproduce (*)
<!---
Important: Provide a set of clear steps to reproduce this bug. We can not provide support without clear instructions on how 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"

<img width="1291" alt="01" src="https://user-images.githubusercontent.com/13585327/70897637-b3156e80-1ffb-11ea-8316-763599b17e7c.png">

4. On the Checkout Payment step activate your coupon code

<img width="1284" alt="02" src="https://user-images.githubusercontent.com/13585327/70897651-bad51300-1ffb-11ea-8948-ca44147ed013.png">

### Expected result (*)
<!--- Tell us what do you expect to happen. -->
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:

<img width="1292" alt="06" src="https://user-images.githubusercontent.com/13585327/70898865-2e781f80-1ffe-11ea-87d2-93a447531df2.png">

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

<img width="1651" alt="07" src="https://user-images.githubusercontent.com/13585327/70899140-b100df00-1ffe-11ea-88cc-9aa7fbba8d4d.png">

### Actual result (*)
<!--- Tell us what happened instead. Include error messages and issues. -->
1. Shipping amount is set to 0.00 (free shipping). There is no information about discount:

<img width="1291" alt="04" src="https://user-images.githubusercontent.com/13585327/70897794-0a1b4380-1ffc-11ea-8035-27706b58a368.png">

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

<img width="1565" alt="08" src="https://user-images.githubusercontent.com/13585327/70899540-7c415780-1fff-11ea-9e6b-981a3472be9f.png">

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. :)
m2-assistant[bot] commented 4 years ago

Hi @atwixfirster. 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.

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


m2-assistant[bot] commented 4 years ago

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:

eduard13 commented 4 years ago

@magento give me 2.4-develop instance

magento-engcom-team commented 4 years ago

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

magento-engcom-team commented 4 years ago

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.

engcom-Echo commented 4 years ago

Hello @atwixfirster

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

Thank you!

atwixfirster commented 4 years ago

Hi, @engcom-Echo

Please add version of magento.

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!

engcom-Echo commented 4 years ago

Hello @atwixfirster

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

Thanks!

atwixfirster commented 4 years ago

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

magento-engcom-team commented 4 years ago

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

jayankaghosh commented 4 years ago

@magento give me 2.3.3 instance

magento-engcom-team commented 4 years ago

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

chernenm-zz commented 4 years ago

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?