News:

Support the VirtueMart project and become a member

Main Menu

VM 2.0.22 add cart working but not working :(

Started by RickMahoney, July 11, 2013, 10:32:43 AM

Previous topic - Next topic

RickMahoney

Alright so i have the basics down i know how to add all the required items, ive looked everywhere and tried all the things people said to do. My add to cart button is still bugging out. it redirects to the cart like it should BUT it does not add the item to the cart like it should. any suggestions?
all of the info i have atm is
site: therealgamersnetwork.net
joomla: 2.5.11
VM:  2.0.22
VM Aio: 2.0.22

its not a jquerry problem because it still happens when im on the atomic template with no jquerry.(i think)

RickMahoney

i just read the top section for this problem, im going to try and do what they suggest and disable the modules on that page and see if that is the issue, ill post if it is. if that is the problem then that is an easy fix.

RickMahoney

Disabled all modules, reverted to atomic defaul template. add cart button works but just pops up a never ending loading icon in the middle of the page

jenkinhill

You do have JavaScript conflicts. eg on the product details page IE debugger throws up these:
Line: 43
Error: Object doesn't support property or method 'setStyle'
Line: 99
Error: Object doesn't support property or method 'fancybox'
Line: 29
Error: Object doesn't support property or method 'addEvent'
Line: 62
Error: Unable to get property 'showActivity' of undefined or null reference

You are loading four different versions of jQuery!
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script src="/plugins/system/slprettyphoto/slprettyphoto/js/jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/templates/siteground-j16-22/js/jquery-1.4.4.min.js"></script>

And also two no conflict scripts:
<script src="/components/com_virtuemart/assets/js/jquery.noConflict.js" type="text/javascript"></script>
<script src="http://therealgamersnetwork.net/modules/mod_shoutbox/assets/js/jquery-conflict.js" type="text/javascript"></script>

You need the first loaded jQ as this must precede the other VM scripts - but those others is just over the top!

You could try this, but not sure if it will work with this amount of jQ - http://forum.virtuemart.net/index.php?topic=111843.0
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

RickMahoney

Holy crap, didnt even notice that i had 4. thanks ill disable them and post if it works.

RickMahoney

Are you just inspecting my website to see how many versions of jquerry are running?

franzpeter

Another possible problem with the add to cart popup can occur if products have a lot of related products. Example: inkjet printers may have for example 6 or seven default manufacturer inks, if offering another manufacturers alternative inks too, we can have already 12 or fourteen different inks or even more. If you offer cables too with different lenght from different manufacturers it can occur that there are 20 or more related products. Showing that in the add to cart popup may slow down the popup or even make it unavailable.

RickMahoney

Ok so i got my template jquery off, im trying to figure out where the other 2 are as i also got the other non conflict out (shoutbox)
any ideas how to find where to take out the other two jqyerys besides the first one?
and there is only one product as i was testing to see if it worked. no other projects or anything else.

RickMahoney

Wait sorry thats a stupid question XD
im so tired i forgot that the location is in the call thingy.
sorry for the beginner mistake.

RickMahoney

alright so...how should i go about doing this? should i go in and just delete the jqueries that are uneaded or sort though endless lines of code to see where they are called and take that out?

franzpeter

You can go to Virtuemart in the Joomla backend -> configuration -> Templates -> Activate Css Styles & Javascripts. I would try my suggestion on a localhost installation. You can try to activate: Using the VirtueMart jQuery and/or Use external google jQuery library. You need to test in the frontend views about missing functiions after deactivating that. It may depend on which template you use and which additional plugins or modules (from other developers) you use. If something does not work, let the external jQuery library from Google deactivated and activate the VM jQuery. If that does not work try it vice versa. That is what we can influence inside virtuemart. If you use modules and plugins from other developers, try to contact them and tell them about your problem. I do not think that the VM forum can support problems created by using others than the native VM modules or plugins. I addtionally do not understand why developers need to add additional jquery libraries to make their things work instead of using the jquery library provided by Joomla / Virtuemart.

jenkinhill

franzpeter developers add in their own jQuery script as they obviously believe that no other jQ using addons will be added to a site. Normally that is OK until you get a conflict that prevents a required function from taking place. The jQueryEasy plugin does help to control jQ loading, but not always if more than one jQ is loading.

For building VM sites I first install VM on a vanilla J2.5 using Beez. Set up a couple of products & make sure everything works. Then change template - and check again. Then if other candy is required, like a slide show I install that & check. If VM or any of the added modules stop working then you know at which stage it happened. Toomany people build a site first, add all the candy stuff they can find and only then get around to testing.
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

franzpeter

jenkinhill,

I fully agree. But not VM or Joomla should get blamed to not work as it should. And I absolutely dislike posts like that: Are you just inspecting my website to see how many versions of jquerry are running? if someone tries to help. :)