News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

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

bunglehaze

Quote from: kyteasdale on January 25, 2012, 17:49:59 PM
Thank you - is this more accurate

  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
  <script src="/eu/plugins/system/jqueryintegrator/jqueryintegrator/jquery.noconflict.js" type="text/javascript"></script>
  <script src="/eu/media/system/js/core.js" type="text/javascript"></script>
  <script src="/eu/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/eu/media/system/js/caption.js" type="text/javascript"></script>
  <script src="/eu/plugins/system/jcemediabox/js/jcemediabox.js?version=111" type="text/javascript"></script>
  <script src="/eu/components/com_virtuemart/assets/js/vmsite.js" type="text/javascript"></script>
  <script src="/eu/components/com_virtuemart/assets/js/facebox.js" type="text/javascript"></script>
  <script src="/eu/components/com_virtuemart/assets/js/vmprices.js" type="text/javascript"></script>





  <script src="http://prodanceportugal.com/eu/modules/mod_artnewsticker/js/script.js" type="text/javascript"></script>

prodanceportugal.com/eu/modules/mod_artnewsticker/js/jquery.js
prodanceportugal.com/eu/modules/mod_artnewsticker/js/jquery.nc.js

Those are two others, I am having similar issues with a gavick module ignoring the jquery version loading in the template and needing its own script enabling too - these are essentially reloading the same functions and causing issues - look at only having a single jquery instance load.

kyteasdale

Thanks for the help - I think I have progress!  I removed all the other jquery loads (The physical jquery.js/jquery.ncs.js files, I have renamed on the ftp so they're inaccessible instead of playing in the module which I wouldn't understand)

So now my lightbox is back to working in chrome/firefox, and now in IE when you click "add to cart" it take you to the shopping cart - plus side is that the button is now working, the downside is that the shopping cart stays empty :S

juagicre

Hi,
My cart was working perfectly with vm2.0.0 and this morning I updated to vm2.0.1 and now the cart does not get the products into...
if this is a jquery incompatibility, why it was working on vm2.0.0? may the developers look at the changes made in this way?
I updated to 2.0.1 to get the confirmation mails, and those are not being sent anyway... :(

juagicre

#18
ok's sorry i just saw the solution and for me it's working, here you go:
http://dev.virtuemart.net/projects/virtuemart/wiki/General_JS-Problems_with_templates_and_jQuery

bunglehaze

Quote from: kyteasdale on January 25, 2012, 22:34:49 PM
Thanks for the help - I think I have progress!  I removed all the other jquery loads (The physical jquery.js/jquery.ncs.js files, I have renamed on the ftp so they're inaccessible instead of playing in the module which I wouldn't understand)

So now my lightbox is back to working in chrome/firefox, and now in IE when you click "add to cart" it take you to the shopping cart - plus side is that the button is now working, the downside is that the shopping cart stays empty :S

The problem you have doing that is your site will look for the file every time it loads and create an error, the best way to deal with it is in the module file, is there no option in the backend to force disable the script?

bunglehaze

#20
Just to let you know, I am having exactly the same problem myself now too - updated to 2.0.1 and add to cart will not add items into the cart, ajax also seems broken as this was working in 2.0.0 and not now. Nothing else changed with my site, modules or templates - only VM2

ADDED:

No Caches enabled
Single instance of jquery loaded by template

^^^^^^^^^^^^

Enabled VM2 jquery as well and ajax now works, this should not need to be done as the latest jquery is already in the header.

prismalight

All was working fine in 2.0.0 with no SEO or just the Joomla SEO. Then I tested 2.0.1 H and I can not get it to work at all. It call the cart but does not add any product.

PRO



jenkinhill

There is a lot of JavaScript you are loading and sure enough, IE9 picks up a conflict on hitting add to cart:

SCRIPT5009: 'siteurl' is undefined
vmprices.js, line 44 character 4

In this bit of code:

$.getJSON(siteurl+'?option=com_virtuemart&nosef=1view=cart&task=addJS&format=json',encodeURIComponent(datas),
function(datas, textStatus) {
if(datas.stat !=0){
var value = form.find('.quantity-input').val() ;
var txt = value+" "+form.find(".pname").val()+' '+vmCartText;
                                                $.facebox.settings.closeImage = closeImage;
                                                $.facebox.settings.loadingImage = loadingImage;
                                                $.facebox.settings.faceboxHtml = faceboxHtml;
$.facebox({ text: datas.msg +"<H4>"+txt+"</H4>" }, 'my-groovy-style');
} else {
                                                $.facebox.settings.closeImage = closeImage;
                                                $.facebox.settings.loadingImage = loadingImage;
                                                $.facebox.settings.faceboxHtml = faceboxHtml;
$.facebox({ text: "<H4>"+vmCartError+"</H4>"+datas.msg }, 'my-groovy-style');
}
if ($(".vmCartModule")[0]) {
$.ajaxSetup({ cache: false })
$(".vmCartModule").productUpdate();
}
if ($(".pp_vmcart_module_hori")[0]) {
$.ajaxSetup({ cache: false })
$(".pp_vmcart_module_hori").productUpdate_mini1();
}
if ($(".pp_vmcart_module_vert")[0]) {
$.ajaxSetup({ cache: false })
$(".pp_vmcart_module_vert").productUpdate_mini2();
}
});
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

PRO


prismalight

Great Job guys  :),
it was simply the on module which was not compatible with the new version. After disabling it everything works fine.
Now it works also with Joomla native SEO and extension.
Sorry for the trouble and once again appreciate your support and work.

buhnad

#27
i cant solve it any tips plz

PRO

Quote from: buhnad on February 18, 2012, 18:52:29 PM
i cant solve it any tips plz , site url [storeq80.com]

just worked for me in firefox, and IE

buhnad

how come it doesnt work with me in the desktop and the laptop both chrome and firefox