Hi, I need help to solve this :(
"ADD TO CART" button is not working. Doesn't add product to the cart. It links to empty cart. Not able to add product quantity.
New installation. No migration done. I get no errors or at least I can't find them.
PHP 5.2.17
Apache
Joomla! 1.7.0 Stable
Mozilla/5.0 Firefox/6.0.1 (the same problem is on all browsers)
VirtueMart 2.0.0-RC-2G / Virtuemart 1.9.8.RC2G_extract_first
Joomla theme YOOtheme Nano
It may be connected to your theme
I don't think so, because it's the same problem on beez_20 and beez5 themes :(
"+" and "-" buttons to add more quantity to the cart is not working as well.
It is quite sure some js problem. Check which jquery do you load.
I am sorry but I am too new into this and don't know where and how to check it? :-[
Here is a link with simular error http://forum.virtuemart.net/index.php?topic=90566.0 and http://forum.virtuemart.net/index.php?topic=90419.0 there are more explanations.
I loaded my VirtueMart page and used Firebug. Under section "Sript" I found three jQuery results:
Quote</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js" type="text/javascript"></script>
<script src="/media/system/js/core.js" type="text/javascript"></script>
<script src="/components/com_virtuemart/assets/js/vmsite.js" type="text/javascript"></script>
<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/media/system/js/modal.js" type="text/javascript"></script>
<script src="/media/widgetkit/js/jquery.js" type="text/javascript"></script>
<script src="/cache/widgetkit/widgetkit-050d3394.js" type="text/javascript"></script>
<script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
<script src="/templates/yoo_nano/warp/js/warp.js" type="text/javascript"></script>
<script src="/templates/yoo_nano/warp/js/accordionmenu.js" type="text/javascript"></script>
<script src="/templates/yoo_nano/warp/js/dropdownmenu.js" type="text/javascript"></script>
<script src="/templates/yoo_nano/js/template.js" type="text/javascript"></script>
<script src="/templates/yoo_nano/warp/js/search.js" type="text/javascript"></script>
<script type="text/javascript">
Any ideas? :(
By the way, database is MySQL, not MySQLi
Quote from: Geee on September 19, 2011, 22:57:13 PM
By the way, database is MySQL, not MySQLi
Good to know :-)
I think it is your /media/widgetkit/js/jquery.js. Delete this file and it should work, when the other component has also the option like vm2 to disable the js, you should create an own custom one. This also speeds up your shop
Thanks, it is working then I turned off my widgekit :)
But I need it on my page :( So maybe someone can help me to build custom script to make all js on my page working together. I think it is only a few minutes for someone who knows all these things ::)
Message me if you are interested $$$
I have the same exact problem!
I would love a solution to this...
Has anyone got this fixed yet? Kind of pointless if you have a shopping cart that won't work.
Ok, this is js conflict! I found some information on this but still this is too difficult for me :(
Widgetkit ON
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js" type="text/javascript"></script>
...
[b]<script src="/media/widgetkit/js/jquery.js" type="text/javascript"></script>
<script src="/cache/widgetkit/widgetkit-050d3394.js" type="text/javascript"></script>[/b]
Widgetkit OFF
[b]<script src="/templates/tmplate_sample/warp/libraries/jquery/jquery.js" type="text/javascript"></script>[/b]
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js" type="text/javascript"></script>
Some links to all this :-\
http://api.jquery.com/jQuery.noConflict/ (http://api.jquery.com/jQuery.noConflict/)
http://docs.jquery.com/Using_jQuery_with_Other_Libraries (http://docs.jquery.com/Using_jQuery_with_Other_Libraries)
And I got one hint for speeding up the page but not sure about this:
Quote
<script type="text/javascript" src="http://www.google.com/jsapi?key=Google_API_KEY"></script>
<script type="text/javascript" charset="utf-8">
google.load("jquery", "1.6.1");
google.load("jqueryui", "1.8.13");
</script>
Google API KEY from here:
http://code.google.com/apis/loader/signup.html (http://code.google.com/apis/loader/signup.html)
There exist page you can upload your jquery scripts and it combines it for you.
if you enable the "System - Language Filter"-Plugin in Jommla 1.7, then the "Add to Cart"-Button does not work in Internetexplorer. (without Language Filter it works fine)
Any ideas how to fix this? (is there some js-file which i can modify this easily on my own (i'm not familiar with jquery, etc)?)
best greetings, martin
Quote from: mlvrsol on October 10, 2011, 07:23:02 AM
if you enable the "System - Language Filter"-Plugin in Jommla 1.7, then the "Add to Cart"-Button does not work in Internetexplorer. (without Language Filter it works fine)
Any ideas how to fix this? (is there some js-file which i can modify this easily on my own (i'm not familiar with jquery, etc)?)
best greetings, martin
ok, found a solution already (if anyone had teh same problem):
replace the line:
$jsVars = "siteurl = '". JURI::root(true) .'/' ."' ;\n" ;
in file "administrator/components/com_virtuemart/helpers/config.php"
with:
$lang =& JFactory::getLanguage();
$locales = $lang->getLocale();
$lg = explode('_',$locales[0]);
$JOOMLA_LANGUAGE = $lg[0];
$jsVars = "siteurl = '". JURI::root(true) . '/' . $JOOMLA_LANGUAGE . '/' . "' ;\n" ;
:-)
Dear user,
We have added on Back-End setters to deactivate JQUERY and some script and CSS if you want.
Look what you need to deactivate, depending your template module.
Best is to look in firebug the loaded script.
If you have jQuery 2 time then you have a conflict and must deactivate it in Back-end
For last post from mlvrsol, on doing this the path is wrong then i don't know why this work(or because you have another Jquery loaded) the BE setter must resolve it correctly.
TKs all for your reports
Patrick
Hi there, Patrick
thanks for your fast reply!
the code above works with the J1.7 native "System - Language Filter"-Plugin and when and when Joomla "Use URL rewriting" is switched on.
It has nothing to do with other JQUERY Scripts or css, because i tested a fresh setup of virtuemart.1.9.8H on J1.7 (as it comes with no other extensions) and the Beez2 - Default Template. If you turn on the System - Language Filter in this test-environment and use URL rewriting, then the AddToCart Button wont work in InternetExplorer.
But nevertheless, VM is great! keep it up ;)
looking forward to the next release
kind regards,
Martin
Hi mlvrsol,
I found why, it's a pure JOOMLA trick witting directly as root : ROOT/LANGUAGE when you add the language filter plug-in
I think the joomla team have to solve this, because the problem is not only in virtuemart, but i do next a fix .
hi there,
i found another bug with the "Add To Cart" Button and Internetexplorer: IE caches the ajax call, so if you have added product to the card and then add the same product later the Quantity is not raised (so the product is not addet to the cart!)
Maybe you can fix this in further releases? i done some small workaround (to get it to work with version 1.9.8H) in the file vmprices.js and addad a random string, so IE will do the ajax call because so the url it isn't in browser-cache:
function sendtocart(form){
var datas = form.serialize();
var randomnumber = Math.floor(Math.random()*9999999999999);
$.getJSON(siteurl+'index.php?option=com_virtuemart&view=cart&task=addJS&format=json&nocache='+randomnumber,encodeURIComponent(datas),
etc...
If you have any problem with module VM - Shopping cart or module VM - Category in Joomla template and you using Widgetkit from Yootheme you must Off jQuery in VM setting (tab Template)
you can setup ajax to dont use the cache
I look if , the best is to never use the cache in product details or to add manually the randomnumber
for the language problem you can try this temp solution
http://forum.joomla.org/viewtopic.php?f=617&t=664932
Hope this is adopted by joomla in core files
I am also having this problem. I have made sure there is a jquery noconflict line after the other library load. at first the button itself would not work. but after doing that and unchecking the virtuemart jquery button it at least does the action and goes to the cart page but gives an empty cart, that just says the following:
Product prices result $0.00 $0.00 $0.00
I have tried unchecking all four backend vm choices and the google and 'external google jquery library' and still get the same thing.
edit: if I turn off the vm jquery the state dropdown stops working on the billing/shipping screens.
it is pretty common nowadays for sites to have other js/jquery items loading and I would hope something can be done to fix this. as another poster said - having a shop without a working cart that works is not very useful.
p.s. I love virtuemart and have used it for many years. I tried another shop and did not like it for many reasons and hope going forward the jquery stuff is figured out. I will probably look at using another template and hope the occ plugin is done soon.
I'm having the exactly same problem as dontflinch as well (see website www.costumeglitz.com.au) where if I switch off the 'Using the Virtuemart jQuery' the cart functionality works but adds nothing into the cart!? Any ideas out there?
Thank fek got this to work! Go into configuration.php file and change the entry:
public $dbtype = 'mysqli'
TO
public $dbtype = 'mysql'
Would be good to know why this worked though, any explanations out there?