Hi,
I've been working with Virtuemart for a number of years now, and have encountered an issue on the latest 3x version that I wanted to share.
It seems that there is difficulty with the default Virtuemart Cart module if you are attempting to use more than just one of them. Either I am missing something, or maybe I am the only person who likes to have ajax updated aspects of the cart available in multiple places on a site! When doing this with the current version, it really just breaks everything and doesn't work as expected. When clicking 'add to cart' only one of however many Cart modules you have set up will update properly. I have researched this, and its mostly due to how the update_cart.js file is written.
I have re-written this in a way that lets you have as many Cart modules set up as you wish. As a longtime developer, and user of this software -- I'd love to help give something back!
https://github.com/trevorbicewebdesign/Virtuemart3-Cart---mod_virtuemart_cart
Its nothing fancy, but it works a little better than before. Maybe someone else will find this useful.
- Trevor
Which vm version? As far as I know this is fixed in latest version.
Was running the latest virtuemart 3x? Version looks like 3.0.9?
If you check out my Git, you can look and see if there are any identifiers...maybe I somehow had the wrong version of the cart module?
On VM3.0.10 there is still the problem of the hidden div being left behind ( the x's) - see screen
On yours Trevor I couldn't get it to install properly with the xml you used .. no parameters
also the code looks like it's from VM3.0.9.. there's been a few changes since in the 3.0.9.x series
Rejigged it a bit (used the latest 3.0.10 xml and renamed it etc) - attached
Works well except when the product list is shown, it isn't shown after the ajax refresh
see http://test.gjcwebdesign.com/joomla336/en/
Nice, thanks for cleaning that up! It seems to be working on my install @ http://makuacoffee.com/jupgrade/. I am checking to see if there are any differences that might account for it working here, but not on your test environment!
So after I checked the files you adjusted, I looked and saw that I had changed the default.php template file. I've used your re-jiggered files on my Git, and I just adjusted the template. Can you re-install and see if that corrected the issue on your test environment?
https://github.com/trevorbicewebdesign/Virtuemart3-Cart-mod_virtuemart_cart_multi
:)
working perfectly -- product list also refreshing and staying open!
Well done..
thank you, is committed. Do you need that for a multivendor, multicart?
Why you use ID ?
I think the first problem is to use ID:
<div id="hiddencontainer" style=" display: none; "> ....
in 2 cart module or more is not javascript and html valid.
I don't understand why GJC Web Design and max validate this change ?
Another problem is you use jquery live.
check the jQuery doc http://api.jquery.com/live/
QuoteAs of jQuery 1.7, the .live() method is deprecated.
Good point, Patrick. Overlooked that.