I create a custom block to display the cart total in magento 2. But I want to update the total and quantity in the right block when a user plus or minus product in the left block.

Please help me how to do that with knockout JS. My design as below.

Thank you so much!

enter image description here

  • Hey You can use ajax request for this i mean whenever you update Qty or updation in product you can call the updation function which will update your price as well. – Shubham Khandelwal Mar 19 at 10:09
  • Hi Shubham Khandelwal, I am using ajax follow this guide magento.stackexchange.com/questions/235040/… However, the ajax update only order total and subtotal. It cannot update the number items and total of item. After ajax update the tax conent is loss. Could you help me the solution? and I want to ask how to update block with ajax? I wrote a file custom-summary.phtml to display the right sidebar. How to reload only it with ajax? – Thien Hoang Mar 20 at 2:51

Your Answer

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

Browse other questions tagged or ask your own question.