cancel
Showing results for 
Search instead for 
Did you mean: 

Edit In Cart using AJAX Model Popup

Edit In Cart using AJAX Model Popup

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.