Description
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"):
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 (*)
- Add some products to the cart.
- Navigate to the cart page. "Clear Shopping Cart" button is not rendered.
- Log in to the Magento admin panel, open store configuration.
- Change stores configuration 'Show "Clear Shopping Cart" button on the cart page' (see description) to yes. Clear configuration cache.
- 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)