Skip to content
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

Created config used for showing/hiding clear cart button on the shopping cart view page. #27917

Merged

Conversation

Neos2007
Copy link
Contributor

@Neos2007 Neos2007 commented Apr 21, 2020

Created config used for showing/hiding a clear cart button on the shopping cart view page. Modified styles in the luma theme which hide the clear cart button.

Description (*)

By default button for clearing shopping cart ("Clear Shopping Cart") is rendered on the shopping cart page to the left of the "Update Shopping Cart" button but it is hidden for the Luma theme (due to styles).
This PR adds stores configuration which is used to determine is clear cart action is enabled.

Configuration Path:

Tab SALES -> section Checkout -> group Shopping Cart -> field select Show "Clear Shopping Cart" button on the cart page (default value is "No"):
image
Checking this configuration is used in the template of "\Magento\Checkout\Block\Cart\Grid" block for identifying to render or not "Clear Shopping Cart" button (will be rendered only if the mentioned config is set to "Yes").

Also modified CSS rule in Luma theme styles which hides the "Clear Shopping Cart" button.

Manual testing scenarios (*)

  1. Add some products to the cart.
  2. Navigate to the cart page. "Clear Shopping Cart" button is not rendered.
  3. Log in to the Magento admin panel, open store configuration.
  4. Change stores configuration 'Show "Clear Shopping Cart" button on the cart page' (see description) to yes. Clear configuration cache.
  5. Reload fronted cart page. "Clear Shopping Cart" button is rendered.

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)
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Created config used for showing/hiding clear cart button on the shopping cart view page. #28705: Created config used for showing/hiding clear cart button on the shopping cart view page.

@m2-assistant
Copy link

m2-assistant bot commented Apr 21, 2020

Hi @Neos2007. Thank you for your contribution
Here is some useful tips 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

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

@m2-assistant
Copy link

m2-assistant bot commented Apr 21, 2020

Hi @Neos2007, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@ghost ghost removed this from Pending Review in Pull Requests Dashboard Apr 21, 2020
@Neos2007 Neos2007 reopened this Apr 21, 2020
@ghost ghost added this to Pending Review in Pull Requests Dashboard Apr 21, 2020
@ghost ghost unassigned nuzil Apr 21, 2020
@nuzil nuzil self-assigned this Apr 21, 2020
Copy link
Contributor

@nuzil nuzil left a comment

Choose a reason for hiding this comment

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

Can you please also cover changes with MFTF tests?

app/code/Magento/Checkout/Block/Cart.php Outdated Show resolved Hide resolved
@ghost ghost moved this from Pending Review to Changes Requested in Pull Requests Dashboard Apr 21, 2020
@Neos2007 Neos2007 force-pushed the config-clear-cart-action branch 2 times, most recently from a296a8a to 273d28b Compare April 23, 2020 13:53
@nuzil
Copy link
Contributor

nuzil commented Apr 24, 2020

@magento run all tests

1 similar comment
@nuzil
Copy link
Contributor

nuzil commented May 22, 2020

@magento run all tests

@nuzil nuzil added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: MFTF test coverage Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. labels May 23, 2020
nuzil
nuzil previously approved these changes May 23, 2020
@ghost ghost moved this from Changes Requested to Ready for Testing in Pull Requests Dashboard May 23, 2020
@engcom-Alfa
Copy link
Contributor

@magento create issue

@ghost ghost added the Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. label Jun 12, 2020
@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Manual testing scenario:

  1. Go to Admin -> Stores -> Configuration -> Sales -> Checkout -> Shopping Cart and set Show "Clear Shopping Cart" button on the cart page to No
  2. Go to Storefront;
  3. Add some products to the cart;
  4. Navigate to the cart page.

Actual Result: ✔️ "Clear Shopping Cart" button is not rendered.

Luma theme

Screenshot from 2020-06-12 14-44-31

Blank theme

Screenshot from 2020-06-12 14-53-34

  1. Go to Admin -> Stores -> Configuration -> Sales -> Checkout -> Shopping Cart and set Show "Clear Shopping Cart" button on the cart page to Yes
  2. Clear configuration cache.
  3. Reload fronted cart page.
    Actual Result: "Clear Shopping Cart" button is rendered.

Luma theme

screenshot_58
Peek 2020-06-12 14-47

Blank theme

screenshot_59
Peek 2020-06-12 14-57

@engcom-Alfa engcom-Alfa moved this from Testing in Progress to Extended Testing (optional) in Pull Requests Dashboard Jun 12, 2020
@engcom-Charlie engcom-Charlie self-assigned this Jun 12, 2020
@engcom-Charlie engcom-Charlie added the QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) label Jun 12, 2020
@ghost ghost added Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. and removed Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. labels Jun 12, 2020
@engcom-Alfa engcom-Alfa added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Jun 12, 2020
@slavvka slavvka added this to the 2.4.1 milestone Jun 12, 2020
@engcom-Charlie engcom-Charlie moved this from Extended Testing (optional) to Merge in Progress in Pull Requests Dashboard Jun 15, 2020
@slavvka
Copy link
Member

slavvka commented Jun 16, 2020

@magento run Semantic Version Checker

@slavvka slavvka moved this from Merge in Progress to To Approve in Pull Requests Dashboard Jun 16, 2020
@ghost ghost moved this from To Approve to Merge in Progress in Pull Requests Dashboard Jun 16, 2020
@slavvka slavvka moved this from Merge in Progress to On Hold in Pull Requests Dashboard Jun 16, 2020
@ghost ghost dismissed nuzil’s stale review June 16, 2020 20:05

Pull Request state was updated. Re-review required.

@slavvka slavvka moved this from On Hold to To Approve in Pull Requests Dashboard Jun 16, 2020
@magento-engcom-team magento-engcom-team merged commit 2c4ee78 into magento:2.4-develop Jul 29, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jul 29, 2020

Hi @Neos2007, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@sidolov sidolov removed this from To Approve in Pull Requests Dashboard Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Design/Frontend Area: Frontend Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: MFTF test coverage Component: Checkout Partner: Comwrap partners-contribution Pull Request is created by Magento Partner Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: to approve QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Created config used for showing/hiding clear cart button on the shopping cart view page.
6 participants