VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: motybz on February 04, 2015, 17:50:47 PM

Title: fix ajax virtuemart 3 cart mudole
Post by: motybz on February 04, 2015, 17:50:47 PM
in vm3 the cart module work with ajax.
in my site i have a "quick-view" option to see the product in fancybox
but when the "add to cart" button clicked out of the fancybox the cart didn't refreshed by ajax (the cart module located on the parent page)
there is a way to send the ajax refresh command from the fancybox to the module in the parent page?
for example you can look over here http://staging1.a-avrahami.co.il/he/%D7%97%D7%9C%D7%A4%D7%99%D7%9D-%D7%9C%D7%9E%D7%98%D7%91%D7%97-%D7%94%D7%9E%D7%A1%D7%97%D7%A8%D7%99/%D7%90%D7%A8%D7%95%D7%9F-%D7%97%D7%99%D7%9E%D7%95%D7%9D-%D7%9E%D7%95%D7%A1%D7%93%D7%99 (http://staging1.a-avrahami.co.il/he/%D7%97%D7%9C%D7%A4%D7%99%D7%9D-%D7%9C%D7%9E%D7%98%D7%91%D7%97-%D7%94%D7%9E%D7%A1%D7%97%D7%A8%D7%99/%D7%90%D7%A8%D7%95%D7%9F-%D7%97%D7%99%D7%9E%D7%95%D7%9D-%D7%9E%D7%95%D7%A1%D7%93%D7%99)
thank u!
Title: Re: fix ajax virtuemart 3 cart mudole
Post by: AH on February 04, 2015, 21:59:48 PM
what quickview option are you using?
Title: Re: fix ajax virtuemart 3 cart mudole
Post by: motybz on February 05, 2015, 11:31:11 AM
to see the product details page
Title: Re: fix ajax virtuemart 3 cart mudole
Post by: GJC Web Design on February 05, 2015, 14:07:03 PM
3rd party t3 template..  http://forum.virtuemart.net/index.php?topic=108212.0

have u asked the template dev?
Title: Re: fix ajax virtuemart 3 cart mudole
Post by: motybz on February 09, 2015, 07:28:51 AM
Quote from: GJC Web Design on February 05, 2015, 14:07:03 PM
3rd party t3 template..  http://forum.virtuemart.net/index.php?topic=108212.0

have u asked the template dev?

It is not related to the template, this function I added the site (via jquery), the thing is, when you click "Add to Cart" in the category page is done "post" and "get" (as in the picture attached)
But when you click "Add to Cart" from the product page (in fancybox) performed only act of "post" and there is no act of "get"!
How do I get to ajax to do the "get" in the parent page?
Title: Re: fix ajax virtuemart 3 cart mudole
Post by: motybz on February 09, 2015, 19:52:32 PM
sharing the solution.
add this to padded.php file
echo "<script type=\"text/javascript\"> var referrer = document.referrer; jQuery('.vm_cart_products', window.parent.document).load('referrer .vm_cart_products .vmcontainer');</script>";