magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

2.3.2 Cart Price Rule for Free Shipping does not apply to matching items only when using Table Rates #25098

Closed TomR5 closed 6 months ago

TomR5 commented 5 years ago

Preconditions (*)

  1. Magento Version 2.3.2
  2. Theme is Alothemes/Expert1
  3. Linux Server
  4. PHP version 7.1.32 (cli); Zend Engine v3.1.0 with Zend OPcache v7.1.32

Steps to reproduce (*)

  1. Enable table rates for shipping (Stores > Settings > Configuration > Sales > Shipping Methods > Table Rates) Condition is "Price vs. Destination". Import Table Rates table. Leave all other shipping methods disabled.
  2. Create a free shipping cart price rule applicable only to certain categories of products (Marketing > Promotions >Cart Price Rules)
    • Active: Yes
    • Websites: Main Website (this is a Single Store site)
    • Customer Groups: select all
    • Coupon: select No Coupon or Specific Coupon with a Coupon Code; it doesn't matter
    • Uses per Coupon and per Customer: 0
    • Set valid dates and Priority to 0

Conditions:

Actions:

Expected result (*)

  1. Select $100 or more of free shipping eligible items. On Cart Page, the free shipping is applied (automatically, or with the coupon code if used). Select a single item NOT eligible for free shipping. On Cart Page, the table rate shipping charge should ONLY be applied to the single item not eligible for free shipping.

If you could provide me a vanilla Magento instance on your environment, I could test there as well (@magento give me 2.3-develop instance - upcoming 2.3.x release)

Actual result (*)

  1. Select $100 or more of free shipping eligible items. On Cart Page, the free shipping is applied (automatically, or with the coupon code if used). Select a single item NOT eligible for free shipping. On Cart Page, the table rate shipping charge for the total for ALL items is applied.

Coupon_Code_Applied_Eligible_Items_In_Cart

Coupon_Code_Applied_Eligible_Items_In_Cart


Coupon_Code_Not_Yet_Applied_Eligible_and_Non_Eligible_Items_In_Cart

Coupon_Code_Not_Yet_Applied_Eligible_and_Non_Eligible_Items_In_Cart


Coupon_Code_Applied_Eligible_and_Non_Eligible_Items_In_Cart

Coupon_Code_Applied_Eligible_and_Non_Eligible_Items_In_Cart

m2-assistant[bot] commented 5 years ago

Hi @TomR5. 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.3-develop instance - upcoming 2.3.x release

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

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


m2-assistant[bot] commented 5 years ago

Hi @itsPranith. 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:

kanthy-magento commented 5 years ago

@magento give me 2.3.2-develop instance

magento-engcom-team commented 5 years ago

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

TomR5 commented 5 years ago

We have narrowed down the problem. The source of the problem has to do with the change from 2.3.0 to 2.3.1 (and persisting in 2.3.2) in module-offline-shipping/Model/Carrier/Tablerate.php where Magento has changed the condition_name of Table Rates "Price vs. Destination" when stored in the tables shipping_tablerate and core_config_data from 'package_value' => ('Price vs. Destination'), to 'package_value_with_discount' => __('Price vs. Destination'), and from 'package_value' => ('Order Subtotal (and above)'), to 'package_value_with_discount' => __('Order Subtotal (and above)'),

and added the Setup/Patch/Data/UpdateShippingTablerate.php file to modify those tables.

TomR5 commented 5 years ago

Hi, @itsPranith, did you get that Magento 2.3.2 dev instance from the eng-com team? I have not gotten one yet myself. Thank you.

kanthy-magento commented 5 years ago

Hi TomR5,

I did not received Magento 2.3.2 dev instance from the eng-com team.

From: TomR5 [mailto:notifications@github.com] Sent: Wednesday, October 23, 2019 1:59 AM To: magento/magento2 Cc: Pranith Bethi; Mention Subject: Re: [magento/magento2] 2.3.2 Cart Price Rule for Free Shipping does not apply to matching items only when using Table Rates (#25098)

Hi, @itsPranith https://github.com/itsPranith , did you get that Magento 2.3.2 dev instance from the eng-com team? I have not gotten one yet myself. Thank you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/25098?email_source=notifications&email_token=ANPXBEBMKHRN72FN2TKASA3QP5PBDA5CNFSM4JBN4OM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB7CUCY#issuecomment-545139211 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANPXBEHL3C2NMFA775FGRRTQP5PBDANCNFSM4JBN4OMQ . https://github.com/notifications/beacon/ANPXBEFYJFQY4FKNLV5E4K3QP5PBDA5CNFSM4JBN4OM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB7CUCY.gif

magento-engcom-team commented 5 years ago

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

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

m2-assistant[bot] commented 5 years ago

Hi @webkul-ratnesh. 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:


TomR5 commented 5 years ago

Thank you @itsPranith and @webkul-ratnesh.

crankycyclops commented 3 years ago

Just curious if there's been any progress on this issue.

TomR5 commented 3 years ago

I have confirmed the pblm still exists on a new client website on Magento 2.4. The only fix I can figure out, which goes against the don't-modify-core-files rule, is to delete the file: vendor/magento/module-offline-shipping/Setup/Patch/Data/UpdateShippingTablerate.php and edit the getcode function in the file: vendor/magento/module-offline-shipping/Model/Carrier/Tablerate.php replacing two lines as follows:

// 'package_value_with_discount' => __('Price vs. Destination'), 'package_value' => __('Price vs. Destination'),

// 'package_value_with_discount' => __('Order Subtotal (and above)'), 'package_value' => __('Order Subtotal (and above)'),

If someone has a better fix that does not involve core magento file changes, I'd like to hear about it.

alexlabarces commented 3 years ago

@TomR5 I'm having a similar issue in Magento 2.3.2 where the Free Shipping rule does NOT get applied to Matching Items Only when using the UPS shipping method. Have you seen this before? Any idea where to correct this? Thanks.

TomR5 commented 3 years ago

No, I'm afraid I do not know how to address a specific UPS problem. We have used different carriers, but we have always had a tablerate .csv uploaded that we use and we only enable "Tablerates" as our shipping method to use.

alexlabarces commented 3 years ago

Thanks for your comment, I appreciate you getting back to me on this.

CFA2021 commented 3 years ago

Hi, I am having a similar issue with the Megaplaza store pickup extension, I choose Free shipping, but free shipping is not applied (it does work with all other shipping methods. I have another issue regarding coupons in magneto - I tried to create a coupon that will give the customer 100% discount on his order, when trying to place an order with this coupon, the cart shows the correct prices but when trying to checkout I get an error: Payment Method Not Allowed - I am using cardknox for the payment method

magento-deployment-service[bot] commented 1 year ago

Hi @shakil-codilar. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @shakil-codilar, here is your Magento Instance: https://93a88bde0106e95d7af85d534b52eabf.instances.magento-community.engineering Admin access: https://93a88bde0106e95d7af85d534b52eabf.instances.magento-community.engineering/admin_aefb Login: 80bd41ad Password: 87f3c4d46609

magento-deployment-service[bot] commented 1 year ago

Hi @shakil-codilar. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @shakil-codilar, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

m2-assistant[bot] commented 6 months ago

Hi @engcom-Bravo. 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:


engcom-Bravo commented 6 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 6 months ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 6 months ago

Hi @engcom-Bravo, here is your Magento Instance: https://93a88bde0106e95d7af85d534b52eabf.instances-prod.magento-community.engineering Admin access: https://93a88bde0106e95d7af85d534b52eabf.instances-prod.magento-community.engineering/admin_1c8d Login: 8e7ffcef Password: 7eeff1401ee9

engcom-Bravo commented 6 months ago

Hi @TomR5,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is no more reproducible.Kindly refer the screenshots.

Screenshot 2024-05-17 at 11 54 16 Screenshot 2024-05-17 at 11 55 26

For $100 or more of free shipping eligible items. On Cart Page, the free shipping is applied.the table rate shipping charge is applied to the single item not eligible for free shipping

Hence We are closing this issue.

Thanks.