0

In cart page, when we change quantity of product, we want the Place Order button to change to Update Cart. When the page gets refreshed with chosen quantities when we click on Update Cart, then the button should become Place Order again.
Do you have an idea how to proceed for this scenario?

0

A simpler solution might be adding a JavaScript listener to the Qty boxes in the cart so that, when a value changes, it submits the form with id form-validate. This submits to Magento\Checkout\Controller\Cart\UpdatePost, with a default action of updating the shopping cart.

This would be much easier than switching the button back and forth, and would streamline the process for the user anyway since the cart would update automatically on entry of a new product quantity, without requiring an extra click.

2
  • can you more clear about your solution please, if you have an example, Thank you so much !
    – sara ben
    Sep 30 at 12:46
  • the client wants that the content of button changes also from place order to update cart
    – sara ben
    Sep 30 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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