Skip to content

leading zeros doesn't accountable in the cart for the cart price rule… #39525

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

Conversation

magentoabu
Copy link
Contributor

… issue fixed

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Cart price rule with condition SKU dosen't take into account the "leading zeros" in the SKU (sku: 01234 is the same as 1234) #37919

Manual testing scenarios (*)

  1. Create product with SKU: 1234..
  2. Create product with SKU: 01234..
  3. Create CART PRICE RULE (for example):
    Specific coupon
    Coupon code: TESTSKU
    ACTION: percent of product price discount, 50% discount amount)
    Apply the rule only to cart items ... (SKU is 01234).
    4.Go to shop front and add product SKU 1234 to CART.
    5.On the cart page enter the coupon code TESTSKU.
    6.Discount for product with SKU: 1234 of 50% didn't applied.

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Copy link

m2-assistant bot commented Jan 7, 2025

Hi @magentoabu. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@m2-community-project m2-community-project bot added Priority: P3 May be fixed according to the position in the backlog. Progress: pending review labels Jan 7, 2025
@magentoabu
Copy link
Contributor Author

@magento run all tests

@Priyakshic Priyakshic added the Project: Community Picked PRs upvoted by the community label Jan 15, 2025
@nuzil
Copy link
Contributor

nuzil commented Jan 17, 2025

@magentoabu can you pls sign Adobe CLA?

@magentoabu
Copy link
Contributor Author

@magentoabu can you pls sign Adobe CLA?

@nuzil ,its done as Adobe CLA signed. Thanks

@nuzil
Copy link
Contributor

nuzil commented Jan 17, 2025

@magentoabu if you can, can you check Static tests? Cause you changed file, it being validated and requires some comment modifications.
Also other tests failure connected to your change

@magentoabu
Copy link
Contributor Author

@magento run all tests

@magentoabu
Copy link
Contributor Author

@magento run Static Tests

1 similar comment
@magentoabu
Copy link
Contributor Author

@magento run Static Tests

@engcom-Dash engcom-Dash moved this from Changes Requested to Pending Review in Community Dashboard Mar 18, 2025
Copy link
Contributor

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @engcom-Dash & @magentoabu,

Please refer to the below review comments.

Thanks

@engcom-Hotel engcom-Hotel moved this from Pending Review to Changes Requested in Community Dashboard Mar 19, 2025
@engcom-Dash
Copy link
Contributor

@engcom-Hotel I have updated the PR with the requested changes hence moving it to the pending review. Thank You!

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash engcom-Dash moved this from Changes Requested to Pending Review in Community Dashboard Mar 20, 2025
@engcom-Hotel engcom-Hotel moved this from Pending Review to Ready for Testing in Community Dashboard Mar 21, 2025
@engcom-Bravo engcom-Bravo moved this from Ready for Testing to Testing in Progress in Community Dashboard Mar 24, 2025
@engcom-Bravo
Copy link
Contributor

@magento run all tests

@engcom-Bravo
Copy link
Contributor

Hi @magentoabu,

Thanks for the collaboration & contribution!

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop

Steps to reproduce

  • Create product with SKU: 1234

  • Create product with SKU: 01234

  • Create CART PRICE RULE (for example):

     Specific coupon
     Coupon code: TESTSKU
     ACTION: percent of product price discount, 50% discount amount)
     Apply the rule only to cart items ... (SKU is 01234)
    
  • Go to shop front and add product SKU 1234 to CART

  • On the cart page enter the coupon code TESTSKU

Before: ✖️ 

Shopping-Cart-03-24-2025_10_37_AM

After: ✔️

Shopping-Cart-03-24-2025_10_47_AM

Builds are failed. Hence, moving this PR to Extended Testing.

Thanks.

@engcom-Bravo engcom-Bravo moved this from Testing in Progress to Extended testing (optional) in Community Dashboard Mar 24, 2025
@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE

@engcom-Dash engcom-Dash moved this from Extended testing (optional) to Merge in Progress in Community Dashboard Mar 25, 2025
@magento-devops-reposync-svc magento-devops-reposync-svc merged commit 6de90ff into magento:2.4-develop Apr 16, 2025
10 of 12 checks passed
@engcom-Charlie engcom-Charlie moved this from Merge in Progress to Recently Merged in Community Dashboard Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P3 May be fixed according to the position in the backlog. Progress: accept Project: Community Picked PRs upvoted by the community
Projects
Status: Recently Merged
8 participants