1

I'm not sure what I have done to mess up the empty cart button in the shopping-cart page. Nothing happens, not even a page-refresh.

Its a multishop and it dosnt work on any shop. Not even using default luma shop.

I got it to work once in chrome Inkognito mode just before. It pupped the warning popup and cleared the cart fine. Afterwords it didnt work in Inkognito mode even.

What to look for or how to debug this?

2 Answers 2

0

Looks like you edited the class of the Clear Shopping Cart button, its class contains action clear.

The file contains the Clear Shopping Cart button is <your custom theme dir>/Magento_Checkout/templates/cart/form.phtml

3
  • The button seams okay <button type="button" name="update_cart_action" data-cart-empty="" value="empty_cart" class="action clear" id="empty_cart_button">
    – AP87
    Oct 7, 2022 at 11:49
  • Did you edit any files related to vendor/magento/module-checkout/view/frontend/web/js/shopping-cart.js or vendor/magento/module-checkout/view/frontend/templates/cart/form.phtml?
    – Tu Van
    Oct 7, 2022 at 12:42
  • Well no - and its the same for a untouched shop with luma theme. I just noticed something though. If I press the button, before all page/script loads or before the "order summary section" loads, it works?
    – AP87
    Oct 8, 2022 at 17:46
0

Figured myself after a while.

A mix the module ox/ajax-qty-update that needs to be updated after update to M2.4.x

Together with enabling this new configuration: Sales>Checkout>Enable Clear Shopping Cart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.