News:

Looking for documentation? Take a look on our wiki

Main Menu

add to cart button not working

Started by uniqueoperator, December 16, 2011, 07:09:47 AM

Previous topic - Next topic

obsolum

#15
I'll add my voice to this thread after having spent the greater part of a day trying to get the "Add to cart" button to work, and having tried every suggestion posted in this thread, with no result.

I'm using J1.5, I've tried with different Joomla templates, the results are all the same.

I'll keep an eye on this thread in the hope that someone eventually does come up with a solution.

EDIT: I did one more test with the default Joomla template (hadn't tried that yet) and lo and behold, the add to cart button works fine. So this leads me to believe that the problem is indeed a jQuery conflict, as the default Joomla template does not use jQuery.

But that still doesn't solve the problem, as disabling jQuery in VM doesn't seem to help  :(

dontflinch

#16
here's what I did and it worked for me.

I disabled the jquery load of my template and associated mega menu.

I also commented out the facebox code on lines 57-77 in components/com_virtuemart/views/productdetails/tmpl/default.php like this:

/*$document->addScriptDeclaration("

jQuery(document).ready(function($) {

$('a.ask-a-question').click( function(){

$.facebox({

iframe: '".$url."',

rev: 'iframe|550|550'

});

return false ;

});

});

"); */


probably, 'noconflicting' that would be better but I didn't notice any problems with it being commented out (yet anyway).


then I set the vm configuration as follows:


  • Use external google jquery library (checked)

and all four of the following checked:
  • Using the VirtueMart CSS   
  • Using the Virtuemart jQuery   
  • Using the product Scripts   
  • Using the Script ajax Countries / Regions

I don't know if this will help anyone else as I think this is something one must just tinker with until they get the right jquery load setup to have full js functioning.

This is the best answer I've seen:
Quote from: Electrocity on December 27, 2011, 11:54:46 AM
If you remove the virtuemart jquery you must provide another method to add jQuery but you must never add 2 time jquery/scripts in your document or you get conflicts

obsolum

Quote from: dontflinch on January 02, 2012, 19:27:42 PM
here's what I did and it worked for me.
That's not doing anything for me, either.

Quote from: dontflinch on January 02, 2012, 19:27:42 PM
I don't know if this will help anyone else as I think this is something one must just tinker with until they get the right jquery load setup to have full js functioning.
Then I'm out of luck because I don't know enough about jQuery coding to begin tinkering with it myself  :(

This is a showstopper for me to get my website launched so I'm really hoping someone comes up with a SOLUTION that WORKS. Not a workaround, that might work in some cases... Clearly it's a problem for many users.

Other than this issue, though, I'm very impressed with Virtuemart.

Rabble

Bump for help!  To my knowledge, JQuery is only loading once, yet Add to Cart fails every time on my RocketTheme template.  (Momentum)

If I switch templates, the Add to Cart button works (even if it's another RocketTheme template).

obsolum

I've given up on VM2 for the moment and am currently testing VM 1.1.9. Add to cart button seems to be working correctly on that one. If I can get some nicer looking templates and get it configured the way I want it to I'll probably be using that.

If this Add to Cart problem gets properly addressed and fixed in a future release maybe I'll contemplate upgrading to VM2, although if I can get 1.1.9 working the way I want it to I don't see any need to do so.

PRO

Quote from: obsolum on January 04, 2012, 08:48:13 AM
If this Add to Cart problem gets properly addressed and fixed in a future release maybe I'll contemplate upgrading to VM2, although if I can get 1.1.9 working the way I want it to I don't see any need to do so.

add to cart works, of course there will be conflicts with other modules, temnplates and things that use java. But that does not mean it doesnt work.

I could say "the template doesnt work"


siebertl

Hi,

same problem at my site....

What i can see is, that "add to cart" button works fine with SSL disabled, and works not with SSL enabled in any case.

Does anybody know why?

Thanks a lot
siebertl.

SashaMacic

Same problem here. Simply does't work. Not working with any of the joomla defult templates....


faulk511

Quote from: bob@robertclinton.com on March 21, 2012, 01:59:22 AM
It's almost always a JQUERY conflict. Download, install and enable the jQuery++ Integrator plugin...

http://extensions.joomla.org/extensions/core-enhancements/scripts/12995?qh=YToxMzp7aTowO3M6NjoianF1ZXJ5IjtpOjE7czo3OiInanF1ZXJ5IjtpOjI7czozMjoiJ2pxdWVyeScsJ2pxdWVyeXVpJywnanF1ZXJ5Zm9ybSciO2k6MztzOjk6IidqcXVlcnknLCI7aTo0O3M6ODoiJ2pxdWVyeSciO2k6NTtzOjc6ImpxdWVyeSciO2k6NjtzOjg6ImNvbmZsaWN0IjtpOjc7czo5OiJjb25mbGljdHMiO2k6ODtzOjExOiJjb25mbGljdGluZyI7aTo5O3M6MTE6ImNvbmZsaWN0aW9uIjtpOjEwO3M6MTI6ImNvbmZsaWN0aW9ucyI7aToxMTtzOjk6ImNvbmZsaWN0JyI7aToxMjtzOjE1OiJqcXVlcnkgY29uZmxpY3QiO30%3D

Worked like a charm.

Look - I don't know where bob found this - Holy Cow - My "Add To Cart" was not working and yes it clearly was a jquery conflict.  I added the plugin - enabled it and tested all browsers.  All of them work correctly.  It's the simple things in life that make me happy.

Visit pestpoolandlawn.com to see it worknig now!   Thanks for the find!  Questions Message me

dezziner

Hello there,


My problem is:

I have set true to display modal popup upon"Add to cart". it is displayed on category page but does not add products into cart. On product detail page it is not displayed.

any idea about this issue please advise me.

Thanks,

Imran Javed
imran.cranberry@gmail.com

will77

I too had the same problem and found my issue and corrected it. I hope they rest of you can benefit from what i found.

It appears some SEO SEF plugins will screw up the cart functions. I was using ACESEF  on my site setup and it was creating the problem. I have to look at my configurations for a workaround to get it working with virtuemart...but if you disable....

"SEO Settings in your joomla global configurations"
Search Engine Friendly URLs
Use URL rewriting
Adds Suffix to URL

You will regain cart functionality immediately. at least that was my issue. Hope it helps.

bobcameron

QuoteLook - I don't know where bob found this - Holy Cow - My "Add To Cart" was not working and yes it clearly was a jquery conflict.  I added the plugin - enabled it and tested all browsers.  All of them work correctly.  It's the simple things in life that make me happy.
Just in case this helps anyone else:
Having the same issue with the "Add to Cart" not working, I installed the JQuery plugin and enabled it. Still no action when clicking on "Add to Cart" button. I had my shop address listed as https, and noticed that I did not have my Joomla setting for SSL turned on. Once I turned ssl on, everything worked perfectly.
Joomla 2.5.4
Virtuemart 2.0.8e

airone93

Just updated to VM 2.0.10, updated AIO and updated plugin tables.
Same problem.
Already installed Jquery Easy.
Add to cart button doesn't show since 2.0.8e.

Already tryed disabling all the facebook and google+ code, but no way.

test url: http://www.hivecityonline.com/_hosted/alm2

jenkinhill

airone93 you do have a JavaScript conflict on page load -
SCRIPT5009: 'Virtuemart' is undefined
orecchini-gufi-kawaii-azzurri-detail, line 33 character 1

That line is Virtuemart.addtocart_popup = '1'

Are you sure you need to load 3 different versions of jQuery and two different versions of no_conflict.js ?

From your page header:

<script src="/_hosted/alm2/plugins/system/jquery/jquery/jquery-1.7.1.min.js" type="text/javascript"></script>
  <script src="/_hosted/alm2/plugins/system/jquery/jquery/no_conflict.js" type="text/javascript"></script>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
  <script src="/_hosted/alm2///js/jquery.noConflict.js" type="text/javascript"></script>
  <script src="/_hosted/alm2///js/vmsite.js" type="text/javascript"></script>
  <script src="/_hosted/alm2///js/facebox.js" type="text/javascript"></script>
  <script src="/_hosted/alm2///js/vmprices.js" type="text/javascript"></script>
  <script src="/_hosted/alm2/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/_hosted/alm2/media/system/js/core.js" type="text/javascript"></script>
  <script src="/_hosted/alm2/media/system/js/modal.js" type="text/javascript"></script>
  <script src="/_hosted/alm2/media/system/js/mootools-more.js" type="text/javascript"></script>
  <script src="/_hosted/alm2/templates/alchemian2/javascript/md_stylechanger.js" type="text/javascript" defer="defer"></script>
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