Author Topic: add to cart button not working  (Read 30817 times)

obsolum

  • Beginner
  • *
  • Posts: 3
Re: add to cart button not working
« Reply #15 on: January 02, 2012, 16:36:58 pm »
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

  • Jr. Member
  • **
  • Posts: 152
Re: add to cart button not working
« Reply #16 on: January 02, 2012, 19:27:42 pm »
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:

Code: [Select]
/*$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:
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

  • Beginner
  • *
  • Posts: 3
Re: add to cart button not working
« Reply #17 on: January 02, 2012, 21:05:27 pm »
here's what I did and it worked for me.
That's not doing anything for me, either.

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

  • Beginner
  • *
  • Posts: 14
Re: add to cart button not working
« Reply #18 on: January 04, 2012, 05:30:47 am »
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

  • Beginner
  • *
  • Posts: 3
Re: add to cart button not working
« Reply #19 on: January 04, 2012, 08:48:13 am »
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10431
  • VirtueMart Version: 3+
Re: add to cart button not working
« Reply #20 on: January 04, 2012, 16:25:17 pm »
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

  • Beginner
  • *
  • Posts: 1
Re: add to cart button not working
« Reply #21 on: January 05, 2012, 14:27:32 pm »
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

  • Beginner
  • *
  • Posts: 7
Re: add to cart button not working
« Reply #22 on: March 04, 2012, 04:33:56 am »
Same problem here. Simply does't work. Not working with any of the joomla defult templates....


faulk511

  • Beginner
  • *
  • Posts: 37
  • Howdy!
Re: add to cart button not working
« Reply #24 on: June 26, 2012, 07:04:30 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

  • Beginner
  • *
  • Posts: 13
Re: add to cart button not working
« Reply #25 on: July 05, 2012, 09:10:08 am »
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

  • Beginner
  • *
  • Posts: 7
Re: add to cart button not working
« Reply #26 on: July 10, 2012, 23:44:17 pm »
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

  • Beginner
  • *
  • Posts: 5
Re: add to cart button not working
« Reply #27 on: August 12, 2012, 17:10:23 pm »
Quote
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.
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

  • Beginner
  • *
  • Posts: 19
Re: add to cart button not working
« Reply #28 on: August 25, 2012, 12:53:11 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28262
  • Always on vacation
    • Jenkin Hill Internet
Re: add to cart button not working
« Reply #29 on: August 25, 2012, 13:09:06 pm »
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

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.28 PHP 7.4.14