Author Topic: Add to cart issues - what's the actual solution?  (Read 112091 times)

bunglehaze

  • Jr. Member
  • **
  • Posts: 490
Re: Add to cart issues - what's the actual solution?
« Reply #15 on: January 25, 2012, 17:59:48 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

  • Beginner
  • *
  • Posts: 16
Re: Add to cart issues - what's the actual solution?
« Reply #16 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

juagicre

  • Beginner
  • *
  • Posts: 20
Re: Add to cart issues - what's the actual solution?
« Reply #17 on: January 26, 2012, 12:11:51 pm »
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

  • Beginner
  • *
  • Posts: 20
Re: Add to cart issues - what's the actual solution?
« Reply #18 on: January 26, 2012, 13:13:43 pm »
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

  • Jr. Member
  • **
  • Posts: 490
Re: Add to cart issues - what's the actual solution?
« Reply #19 on: January 26, 2012, 15:49:24 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

  • Jr. Member
  • **
  • Posts: 490
Re: Add to cart issues - what's the actual solution?
« Reply #20 on: January 26, 2012, 18:56:30 pm »
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

  • Beginner
  • *
  • Posts: 19
Re: Add to cart issues - what's the actual solution?
« Reply #21 on: February 16, 2012, 17:38:53 pm »
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10428
  • VirtueMart Version: 3+
Re: Add to cart issues - what's the actual solution?
« Reply #22 on: February 16, 2012, 18:21:27 pm »
prismalight, NOBODY can help without a url

prismalight

  • Beginner
  • *
  • Posts: 19

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28117
  • Always on vacation
    • Jenkin Hill Internet
Re: Add to cart issues - what's the actual solution?
« Reply #24 on: February 16, 2012, 23:47:09 pm »
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:
Code: [Select]
$.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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.24 PHP 7.4.14

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10428
  • VirtueMart Version: 3+
Re: Add to cart issues - what's the actual solution?
« Reply #25 on: February 17, 2012, 13:16:06 pm »
http://www.prismalight.com.mx/test/index.php

you are NOT loading jquery at all.

"JQUERY HAS to be loaded for add to cart to work
Virtuemart product scripts have to be loaded."

http://forum.virtuemart.net/index.php?topic=95979.msg315424#msg315424

prismalight

  • Beginner
  • *
  • Posts: 19
Re: Add to cart issues - what's the actual solution?
« Reply #26 on: February 17, 2012, 16:27:06 pm »
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

  • Beginner
  • *
  • Posts: 36
Re: Add to cart issues - what's the actual solution?
« Reply #27 on: February 18, 2012, 18:52:29 pm »
i cant solve it any tips plz

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10428
  • VirtueMart Version: 3+
Re: Add to cart issues - what's the actual solution?
« Reply #28 on: February 18, 2012, 19:43:55 pm »
i cant solve it any tips plz , site url [storeq80.com]

just worked for me in firefox, and IE

buhnad

  • Beginner
  • *
  • Posts: 36
Re: Add to cart issues - what's the actual solution?
« Reply #29 on: February 18, 2012, 20:34:39 pm »
how come it doesnt work with me in the desktop and the laptop both chrome and firefox