0

From the cart page, if we want to edit and change production option and qty then there is an option to edit that product from cart page.

If we click on the edit button then it will take me to this URL.

https://www.mywebsite.com/checkout/cart/configure/id/15/product_id/3/

Instead of the redirect to this page, I want to open a modal popup on the same page from where customer can update product option and quantity and update cart.

I want popup like this. https://i.imgur.com/HtOkre7.png

You can check the complete demo here.

https://www.mexbs.com/demo-edit-in-cart/checkout/cart/

https://i.imgur.com/rFbySMa.png

https://i.imgur.com/usQabDH.png

I have override checkout/cart/configure the controller action. Also created a layout file that loads the required PHTML files.

https://i.imgur.com/rmo4vu1.png

Now my question is I want to load content on popup using ajax for that need AJAX response in JSON format. I am getting a response on the browser XHR tab in HTML format and getting an error on console because the response is not in JSON format.

Please advice me where should I change in order to load layout handle and get a response on JSON format from checkout/cart/configure file.

Any help would be much appreciated.

  • Add your code here. – Sohel Rana May 21 at 15:42

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.