Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Dropdown Shopping Cart(SKU# FLEX-00001)

TOPIC: Minicart count update and deleting products.

Minicart count update and deleting products. 5 years 6 months ago #15698

I have two ostensibly AJAX related issues:

1) If you add a product to the cart via the Quick Look (ie Fancybox / iframe), the cart count button on the mini cart doesn't increment. If you continue shopping and view the contents, they're not updated either. How would I force a refresh of this?

2) You can delete one product from the cart via the dropdown module, but not a second. Clicking the button does nothing at all.

Are either of these behaviours expected, or is it more likely I've broken my template? I can manage the second one by not allowing customers to delete the items in the minicart, but the first one is more of an issue.
The administrator has disabled public write access.

Minicart count update and deleting products. 5 years 6 months ago #15702

Hi Ian, definitely none of those behaviors are expected. There must be a JS problem that breaks things apart on your website.

What is your website URL that i can see and try to figure out what is going on?

By the way, make sure;

This joomla plugin is unpublished: System - Page Cache
This joomla plugin is published: Flexible - Virtueamart 3 Dropdown Shopping Cart - Plugin

Regards.
The administrator has disabled public write access.

Minicart count update and deleting products. 5 years 6 months ago #15709

Hi,

Thanks for responding. Is there somewhere more private I can send you the URL? The site's not ready for public scrutiny yet.

The plugins are correct as per your message.
The administrator has disabled public write access.

Minicart count update and deleting products. 5 years 6 months ago #15710

Hi Support,

I'm still waiting for a response to this. I've checked on a couple of our other sites and this problem occurs there too.

I've found a clumsy workaround by calling
$("body").trigger("updateVirtueMartCartModule");
in the afterClose of the fancybox that fires from the quicklook (within flexibleMartGlobabl.php), but the minicart doesn't update until the quicklook is closed.

Can someone come back to me and provide a PM or email address or something so we can get some support on this?
The administrator has disabled public write access.

Minicart count update and deleting products. 5 years 5 months ago #15730

Hi Ian,

I am really sorry, once i said: "definitely none of those behaviors are expected." I misunderstand you at first. I wasn't aware, you were actually talking about adding product via "quickLook" (via iframe).

Of course, it is impossible to set a communication from the iframe to parent. In order to update the shopping cart module within the parent window, we must know whether the user is added the product to cart within iframe window, right? So, within iframe, we need to capture that add-to-cart event, and pass it to the parent (which is where the dropdown shopping cart exist) but unfortunately, there is no way to do it. This is also against browser's policies, thus it is restricted because it would cause serious security problems (the parent can pass arguments/events/messages to iframe using Window.postMessage(), and iframe can listen those messages but this communication is 1 way only. No backward. Some old browsers were doing this communication 2 ways, but not anymore)

So, the only option we got here is to capture the "lightbox" close events, because this is happening within the parent, so the parent can listen for that event and do something in case it happens (i.e: once lightbox is closed, update the dropdown shopping module -- which you already have figured out)

BTW: There is probably the only possible way is to send AJAX request to a shopping cart api to update the shopping cart module (but this requests must be done in an interval, in every 5 seconds for instance), so once you add product within iframe, the shopping-cart module will get this updates within 5 seconds.. BUT!! this would probably lead a serious performance problem in the long term, i won't recommend you to do this kind of implementation to your server)

About your second problem, i can help you with though, can you email This email address is being protected from spambots. You need JavaScript enabled to view it. your website URL where i see things in action?

Regards.
The administrator has disabled public write access.
Time to create page: 0.179 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo