News:

Looking for documentation? Take a look on our wiki

Main Menu

Products do not add to cart.

Started by RomanWeb, October 07, 2012, 23:35:20 PM

Previous topic - Next topic

RomanWeb

Hello VM2 Experts,

I'm doing my first site based on Virtuemart.
It was going quite well, but at some point, I noticed that the products do not add to the cart.

I think I noticed it a bit late, and I'm not sure about all the details that I added between the time when it was working and now.
I did try most of configuration changes I could find, but no luck so far.

I suspect that it could have happened when I uninstalled bunch of extensions that were not used before moving it to real hosting from my local PC. First I though it is not working on real hosting, but then I noticed that it's the same on my XAMPP install at home.

Here's the link: http://artisansjewelry.ca
I disabled Add to cart everywhere except detail pages, and it is enabled only on some pages, e.g.:
http://artisansjewelry.ca/earrings/turquoise-earrings-nathalie-detail

When I click add to cart, it brings up the cart, but the product is not added.

I did not do any updates and did not install any plugins.
Some plugins that I uninstalled are K2 framework, Ice Cart maybe some more.

I would really appreciate any hints!
Thanks!
 

K&K media production

I think its a template problem. Please deactivate your vm overrides and test it again.

RomanWeb

#2
Quote from: kkmediaproduction on October 08, 2012, 00:02:39 AM
I think its a template problem. Please deactivate your vm overrides and test it again.

Well, I don't think I was using any overrides.
I actually was changing the files directly (Well, I know now this is not good)

But I have another earlier version of site (french version) that still has cart working,
and it has same modifications in files. in particular, two files I made some slight modifications, are:
\components\com_virtuemart\views\productdetails\tmpl\default_addtocart.php
\components\com_virtuemart\views\productdetails\tmpl\default_showprices.php

In the meantime, I might try to publish that other working version on other domain to demonstrate it.

And sorry, I'm using
PHP v5.2.17
Joomla! 2.5.6 Stable
Virtuemart 2.0.10  August 22 2012

Roman

bytelord

Hi,

First i would like to tell that it is better to upgrade your php version to 5.3.x.

When you are making changes to the templates is always better to override them because after a vm update you gonna loose all your changes you made.
You can simple copy the files you want to override, on you case default_addtocart.php and default_showprices.php, by simply copy them to: your_joomla_folder\templates\your_joomla_folder\html\com_virtuemart\productdetails\default_addtocart.php and default_showprices.php to the same folder. (create the folders also).

More information regarding template overrides you can be found here: http://forum.virtuemart.net/index.php?topic=98505.0 and here: http://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system

Now to your issue. There is probably a javascript conflict with your joomla template or any module/plugin uses javascript. Using firebug can help you find any js conflicts and also examine you code and css styling. Take a look over here how you could use firebug: http://forum.virtuemart.net/index.php?topic=102850.0

Hope it helps you out

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

bytelord

Hello again,

Taking a look over your site it seems that is a javascript issue. So you could test it with beez joomla template and without vm template overrides to examine.
Your template yoo_master loads it's own jquery (i don't know the version) so it's better to use vm jquery.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

RomanWeb

Thanks for all your comments,

I'll surely move the files that I modified and start using overrides, but for now I think I will try to not complicate it further until I figure out the issue.
I have uploaded version of the site that I forked out at some point. And I'm using same template etc. there.. and it does work..
Please see: http://bijouxartisanal.ca/earrings/topas-boucles-detail - when add to cart is pessed it appears in the cart.

One extension that I do have on the Non-working version that I do not have on the working one is
System - JCH_Optimize that supposed to work with all these javascript optimizations and other things you mention in the answers.
It did affect some stuff, when I tried to use it for extentions, but eventually I completely disabled it.. maybe there are some remains...

As for the loading scripts from VM rather than template, any suggestions how would I enforce this?

Thanks for all your help,
Roman

bytelord

Hello,

Is not exactly the same. If you take a look on the image i attached from your second url there is not javascript confict because you have disable the jquery from your template and you use a live one from google. This is right. The first is wrong.

JCH Optimize may be compress and minify js but many time causes errors and conflicts that you have to resolve. As i mention above please use firebug to examine them. JCH hould be used when you site is ready and you are sure that everything is working. Then test with JCH to compress your css/js and resolve any conflicts or exclude js libraries from JCH.

Regards

[attachment cleanup by admin]
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

RomanWeb

#8
Thanks, Bytelord,

I put back the check marks on all items in Activate Css Styles & Javascripts and now it works.
Well, I removed these checks only after problem appeared, so I suspect something else, like JCH was causing the problem to start with.

That was the best support forum experience so far! :)


emilystanfford

#9
I'm having a similar problem. After upgrading I can't add items to the shopping cart when using Safari browser or Internet Explorer 7.0.


bytelord

Hello,

Seems to be a template issue, ie 7 is too old. For my sites i use custom code for ie7 or ie8 for css and js cause of incompatibility.
Please try it again without template overrides and post your results.

btw, Safari has development tools, enable them at Safari-->Preferences-->Advanced, and check the box next to "Show Develop menu in menu bar"
are similar to firebug.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!