News:

Looking for documentation? Take a look on our wiki

Main Menu

Multiple Cart Modules

Started by trevorbicewebdesign, September 12, 2015, 07:13:49 AM

Previous topic - Next topic

trevorbicewebdesign

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

Never underestimate the power of stupid people in large groups.
[url="http://webdesign.trevorbice.com/"]http://webdesign.trevorbice.com/[/url]

K&K media production

Which vm version? As far as I know this is fixed in latest version.
Get translatable custom fields:
[url="http://extensions.virtuemart.net/products/multilingual-translatable-custom-fields-detail"]http://extensions.virtuemart.net/products/multilingual-translatable-custom-fields-detail[/url]

trevorbicewebdesign

Was running the latest virtuemart 3x? Version looks like 3.0.9?
Never underestimate the power of stupid people in large groups.
[url="http://webdesign.trevorbice.com/"]http://webdesign.trevorbice.com/[/url]

trevorbicewebdesign

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?
Never underestimate the power of stupid people in large groups.
[url="http://webdesign.trevorbice.com/"]http://webdesign.trevorbice.com/[/url]

GJC Web Design

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/
GJC Web Design
VirtueMart and Joomla Developers - php developers [url="https://www.gjcwebdesign.com"]https://www.gjcwebdesign.com[/url]
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
[url="https://extensions.joomla.org/profile/profile/details/67210"]https://extensions.joomla.org/profile/profile/details/67210[/url]
Contact for any VirtueMart or Joomla development & customisation

trevorbicewebdesign

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!
Never underestimate the power of stupid people in large groups.
[url="http://webdesign.trevorbice.com/"]http://webdesign.trevorbice.com/[/url]

trevorbicewebdesign

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?
Never underestimate the power of stupid people in large groups.
[url="http://webdesign.trevorbice.com/"]http://webdesign.trevorbice.com/[/url]

trevorbicewebdesign

Never underestimate the power of stupid people in large groups.
[url="http://webdesign.trevorbice.com/"]http://webdesign.trevorbice.com/[/url]

GJC Web Design

:)

working perfectly -- product list also refreshing and staying open!

Well done.. 
GJC Web Design
VirtueMart and Joomla Developers - php developers [url="https://www.gjcwebdesign.com"]https://www.gjcwebdesign.com[/url]
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
[url="https://extensions.joomla.org/profile/profile/details/67210"]https://extensions.joomla.org/profile/profile/details/67210[/url]
Contact for any VirtueMart or Joomla development & customisation

Milbo

thank you, is committed. Do you need that for a multivendor, multicart?
Should I fix your bug, please support the VirtueMart project and become a [url=http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail]member[/url]
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

#10
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.
Free XML sitemap generator [url="http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm"]http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm[/url]  , Free Unused Image cleaner [url="http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm"]http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm[/url]
Language Switch in product & category [url="http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm"]http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm[/url]
More extentions [url="http://shop.st42.fr/en/"]http://shop.st42.fr/en/[/url]

Milbo

Good point, Patrick. Overlooked that.
Should I fix your bug, please support the VirtueMart project and become a [url=http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail]member[/url]
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/