News:

Support the VirtueMart project and become a member

Main Menu

Fancybox close button will not update number of products in cart

Started by Meton, July 18, 2015, 01:32:12 AM

Previous topic - Next topic

Meton

Hi guys,

If you use the X (close) button in the fancybox it will close the lightbox witht the fancybox but it will not update your shoppingcart number of products. If you click on continue shopping it will.

What i currently did to get around this is create a 2nd continue shopping button but styled it as a close button.

Is there a better way to do this?

Kind regards,

Meton
Joomla!         3.6.5
VirtueMart     3.0.18

AH

Looks like you have a javascript error of some kind -

Look for java conflicts using a browser debugger such as firebug in firefox

And post a live url if you need someone to look at the site
Regards
A

Joomla 3.10.11
php 8.0

jenkinhill

Yes, the close (X) works OK for me on VM3.0.9.4 with default VM templates, closes the popup and adds the product to the cart.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

AH

But the (x)  does not influence the adding to cart - that happens "silently"
Regards
A

Joomla 3.10.11
php 8.0

hegbi

Older topic, but this will maybe help someone...

It seems that this is happening due to template overrides of VM Cart Module. For my template, this was a solution:

In file "modules\mod_virtuemart_cart\assets\js\update_cart.js"

between lines 24 & 25 (just before line
jQuery(module).find(".show_cart").html( datas.cart_show);
)

I have added these two lines
jQuery(module).find(".spvm-total-product").html( datas.totalProduct);
jQuery(module).find(".spvm-cart-total-bill").html( datas.billTotal);


and it works OK even if you close the popup on X button or you have autoclose add to cart popup. These two lines are for update of total quantity and total amount in cart module.

Please note that "spvm-total-product" and "spvm-cart-total-bill" are connected to my template, for various templates these are different...

J3.5.1 - VM3.0.16