Skip to content

Conversation

aasim110
Copy link
Contributor

@aasim110 aasim110 commented Jul 6, 2023

Description (*)

Fixed: Incorrect discount amount when using fixed discount amount for the whole cart

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Cart price rules - Incorrect discount amount when using fixed discount amount for whole cart #37496

Manual testing scenarios (*)

Check this steps for Manual testing : #37496 (comment)

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)

@m2-assistant
Copy link

m2-assistant bot commented Jul 6, 2023

Hi @aasim110. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.

Add the comment under your pull request to deploy test or vanilla Magento instance:
  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ 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: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: pending review labels Jul 6, 2023
@aasim110
Copy link
Contributor Author

aasim110 commented Jul 6, 2023

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@aasim110
Copy link
Contributor Author

aasim110 commented Jul 7, 2023

@magento run WebAPI Tests, Static Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@aasim110
Copy link
Contributor Author

aasim110 commented Jul 7, 2023

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@aasim110
Copy link
Contributor Author

aasim110 commented Jul 7, 2023

@magento run Database Compare

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@aasim110
Copy link
Contributor Author

aasim110 commented Jul 7, 2023

@magento run Integration Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@aasim110
Copy link
Contributor Author

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

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@aasim110
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@aasim110
Copy link
Contributor Author

@magento run WebAPI Tests, Integration Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@aasim110
Copy link
Contributor Author

@magento run Functional Tests CE, Functional Tests B2B

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@aasim110
Copy link
Contributor Author

@magento run Functional Tests CE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@sinhaparul sinhaparul added the Project: Community Picked PRs upvoted by the community label Jul 26, 2023
@engcom-Lima
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

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 @aasim110,

Thanks for the reply here #37730 (comment)!

But actually, I think we need an automated test here to cover this particular scenario, in which the discount amount is displaying incorrectly.

@aasim110
Copy link
Contributor Author

aasim110 commented Aug 8, 2023

@engcom-Hotel, I don't see any conceivable approach, as there's no requirement to include it for a specific scenario.

@engcom-Hotel
Copy link
Contributor

Thanks @aasim110, for the reply! We are moving further with this PR.

@engcom-Lima
Copy link
Contributor

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop and PHP 8.1

Manual testing scenario:
Create a Cart price rule:

1 - Marketing -> Promotions -> Cart Price Rules

Conditions: Subtotal (excl Tax)equals or greater than 1000

2 - Actions: Fixed amount discount for the whole cart
Discount amount 500

3 - Create a plugin afterGetPrice for the class Magento\Quote\Model\Quote\Item. method getPrice() or paste the Folder in the path app/code.
Magz.zip

4 - Choose a configurable product, and add it to the cart. The price will be changed to the new one, after that, apply the coupon code and Check the discount value.

Before: ✖️ Discount was showing 250 instead of 500
Screenshot 2023-08-14 at 3 57 24 PM

After: ✔️ Now showing 500
Screenshot 2023-08-14 at 4 42 20 PM

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

@engcom-Echo
Copy link
Contributor

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

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Echo
Copy link
Contributor

Failing test are not related to PR Hence moving it to Merge In Progress

@engcom-Echo
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Echo
Copy link
Contributor

@magento run Functional Tests EE,Unit Tests ,WebAPI Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Echo
Copy link
Contributor

@magento run Integration Tests,Functional Tests B2B

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Echo
Copy link
Contributor

@magento run Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Echo
Copy link
Contributor

Functional Tests B2B,Functional Tests EE Failures are different on last two run on same commit. Other build failures are not related to PR changes.
Functional Tests B2B
Run1
37730-b2b

Run2
37330-b2b2

Functional Tests EE
Run1
37730-ee

Run2
Screenshot 2023-08-18 at 2 06 02 PM

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit f906144 into magento:2.4-develop Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Project: Community Picked PRs upvoted by the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cart price rules - Incorrect discount amount when using fixed discount amount for whole cart

7 participants