Skip to content

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

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #27917: Created config used for showing/hiding clear cart button on the shopping cart view page.


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.

Preconditions (*)

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.

Steps to reproduce (*)

  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.

Actual Result (*)

Expected Result (*)

Clear Shopping Cart functionality should work as previously (expected).

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)

Metadata

Metadata

Assignees

Labels

Component: CheckoutIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P4No current plan to fix. Fixing can be deferred as a logical part of more important work.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.Triage: DoneHas been reviewed and prioritized during Triage with Product Managersfeature request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions