VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: stoddsie on October 15, 2012, 14:45:55 PM

Title: Manually display the popup Cart Modal
Post by: stoddsie on October 15, 2012, 14:45:55 PM
Hi All

I have a standalone php page running inside a Jumi holder. On this page I have an "Add to Cart" button which, as you'd expect, adds a product to the cart, and it does this via javascript and ajax. What I want to do now is manually popup the modal window "product added cart" after this ajax process has finished, from the javascript.

I know that this modal window is being triggered by javascript from within normal virtuemart product details pages, but cannot seem to make a call to display this manually.

Does anyone have any idea on how to do this, or have done it themselves before.

Regards

James
Title: Re: Manually display the popup Cart Modal
Post by: stoddsie on October 15, 2012, 17:43:52 PM
Actually I managed to do it myself in the end:


jQuery.facebox(data, class);


You can pass in HTML markup as the first parameter "data", and an optional css class as the second parameter.

Hope someone finds this useful.