News:

Support the VirtueMart project and become a member

Main Menu

Add to cart issues - what's the actual solution?

Started by stuclark, January 06, 2012, 18:30:11 PM

Previous topic - Next topic

Studio 42

#135
We rewrote some code, next revision must correct many little conflict/errors.
BTW we removed some unnneeded FE scripts from default load to gain page speeding.

You can now use vmJsApi::js() function to load script in your module(after loading the virtuemart config file)

vmJsApi::js( false,'jquery','',true);
load jquery for eg
(looking in template or fallback to virtuemart and load it)

Some explains :
/**
* Write a <script></script> element
* @param   string   path to file
* @param   string   library name
* @param   string   library version
* @param   boolean  load minified version
* @return  nothing
*/

public static function js($path=false,$namespace,$version='', $minified = null)


It's better to use it always, if the script is only for virtuemart, this prevent errors in modules for eg.
BUt you MUST make your own NAMEspace if you write a personnal library/script.
such as mod_mymodulescript.js give
vmJsApi::js('modules/mod_mymodule','mod_mymodulecript','',true);
the function auto add the "ROOT" from joomla and the extention ".JS" to load the file

YOu can look in JOOMLAROOT\administrator\components\com_virtuemart\helpers\config.php
To see many example
(This work same for external script loading)

More info http://dev.virtuemart.net/projects/virtuemart/wiki/General_JS-Problems_with_templates_and_jQuery

goulader

really useful information, i will change my official website Κατασκευή Ιστοσελίδων Simple by using joomla virtuemart.

very good post

Tom Goedhart

Unfortunately i've got the same problem. I had multiple instances of jQuery loaded so i turned them all off. Without result. When i play with various jQuery load-options i get some strange results:

When i load jQuery via the jQuery Easy plugin, the popup works but won't add anything to my cart. Also all the other jQuery won't work on the Virtue-mart-pages.

When i load jQuery manually in my template after the <jdoc:include type="head" /> the popup wont work and i'm redirected to my cart. Still empty. However all the other jquery is working on the Virtue-mart-pages.

When i load jQuery manually in my template before the <jdoc:include type="head" /> the popup works and when i look in my cart it is updated. However all the other jQuery-elements are again not working.

What is going wrong? When you look at the site now i placed the jQuery manualy before the <jdoc:include type="head" />.

You can visit the site here: http://www.verbiest.nl/index.php/dansen/cursussen-paren/bruidsparencursus-spoedcursus-detail
My virtue-mart settings are:

Virtuemart jQuery = Off
Product Scripts = On
Script Country's = Off

$live_site = '';

Actlas

Good question. To repeat the topic title: What is the actual solution now?

Lorrein

Hi,

I'd like you to know I found some cashing problems preventing add to card to work properly.

http://forum.virtuemart.net/index.php?topic=102534.msg340427#msg340427

Tom Goedhart

Tnx lorrein! I've read your post and spathe issues described sound formilliar! I don't think it will fix the jquery problem but I hop it does fix the add-to-cart functions! I'll test it and let you know!

anjousa

Quote from: marrius on April 25, 2012, 23:18:28 PM
My problem was as follows. If you activate jquerry, lightbox does not work well, if I disable jquerry in VirtueMart, not work basket. So I found the following compromise solution for the configuration consisting of Joomla 2.5.4 + VirtueMart 2.0.6 + Template shape5 vertex + xmap + joomla watch:

- I disable the VirtueMart function: Use external library jquery google
- I disabled the function: Using the jQuery VirtueMart
- I disabled system cache, instead I activated progressively cache
I installed JQuery EASY with the following settings:
   = Enable jQuery
  = Strip Conflict No Code: Yes
  = Add No Conflict Code: Thru script declaration

With this settings, both cart and lightbox works fine.

My problem is, I did what you say and my virtuemart works, but after I installed jquery my joomla menu is not working:
Site | Menus | Content | Components | Extensions | Tools | Help
Just the bottons works, do you know how to turn jquery off?
Thanks!

RedJohn

In my case I had multiple instances of jQuery loaded.
One from google or virtuemart (doesn't matter), and second with external module slider (mod_btslideshow).
The simple solution is disable for test modules OR copy all files to local hard drive and search all js files to find and delete (from serwer) this twice declarated file.

PS. sory for my english, i hope that You understands and i can help.

communion

FYI Add to cart is broken in IE9. Works fine in compat mode (IE8 mode). This happens on clean install of VM 2.0.6 or 2.0.8 with barebones Joomla 1.5.26 install. No special plugins or anything installed. It works in every other browser, FF, Chrome, Safari, etc. but IE9.

Might want to look into that...It pretty much makes this offering, although generally awesome, useless to the masses.


communion

FYI Add to cart is also broken under Joomla 2.5 with 2.0.6-2.0.8 in IE9. It just links to the cart page without updating the contents. Working in IE 8 compat mode, although the facebox popup is really wide, may need a css exception for IE8.

Will continue testing, but hoping this can be fixed in the next release, I have clients that need VM2!


DukeURL2

#145
Hi all,

I too was having the same "add to cart" problem. However, I solved the issue by unchecking the "aad to cart"... checkbox in VirtueMart configurations.

DukeURL2

sopetite

Unfortunately I can also attest taht the Add to Cart function is broken for 2.08c. It broke after I updated from 2.08a to 2.08c on my site, taglovely.com


PRO

Quote from: sopetite on July 12, 2012, 16:25:32 PM
Unfortunately I can also attest taht the Add to Cart function is broken for 2.08c. It broke after I updated from 2.08a to 2.08c on my site, taglovely.com



^^ all products are set to "notify me"

So how can we look?

have you tried with another template?

beez_20 has a lot of java

communion

Mine is working in everything but IE9 specifically. Can someone take a look here:

http://www.leeoskarpaintings.com/test

Thanks in advance

communion

Ok, after further testing, I disabled the "Add to Cart Modal Window" function in the Configuration, and the product is still not added to the cart on IE9, the browser just redirects to the cart page but the product is not added. Also quantity buttons are not working on IE9 either.

Can someone take a look here:
http://www.leeoskarpaintings.com/test