VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: johnyDev on February 16, 2014, 00:56:19 AM

Title: Add to cart sends to empty Cart/Checkout page on Ajax element
Post by: johnyDev on February 16, 2014, 00:56:19 AM
Hello,


I am developing a module to load Virtumemart products in a pagination system, but with Ajax call. It's simple the fist load there is 4 products and a "load more" button when it will be clicked 4 more products will be loaded to the page using infinite scroll and manual trigger javascript plugins.

the problem is the add to cart button works only on the first loaded page, the first 4 products loaded, but it won't work on the new added products via Ajax.

I don't know how add t cart system works but I think it's because of "vmprices.js" which is already loaded and it will not take effects on the new added products via Ajax

can you please suggest a solution to make the add to cart option works on the new loaded products via Ajax (the page will not be refreshed or loaded again, only the products are loaded via Ajax)

Thank you in advance, it's really my only option to post here.
Title: Re: Add to cart sends to empty Cart/Checkout page on Ajax element
Post by: Milbo on February 16, 2014, 18:44:53 PM
We may have to change the core for that. Or you need to redo it somehow. If you find a solution, but you need to change the core, dont hesitate to post your idea here. We could also use it for the product prices in the product edit then.