Author Topic: Add to cart not working  (Read 40718 times)

pikefisher

  • Beginner
  • *
  • Posts: 1
Add to cart not working
« on: August 11, 2008, 18:17:02 pm »
Having some trouble with a new site set up using the following.

Joomla 1.5.5, -  Virtuemart 1.1.2 - sh404sef -1.0.11_Beta - build_147 - Joomla 1.5.x

With sh404sef - rewriting mode - 'with .htaccess (mod_rewrite)' enabled, 'add to cart' button fails to work in all cart pages.

With sh404sef 'by component' set to 'skip' the add to cart button works as normal.

There have been a couple of listings of a similar problems with 'add to cart', but with ssl enabled, anyone have a suggestion if this is a settings issue that I am missing?

Thanks in advance for any guidance or tips.

Yannick

  • Jr. Member
  • **
  • Posts: 82
    • Virtuemart Themes & Templates
Re: Add to cart not working
« Reply #1 on: August 16, 2008, 12:57:55 pm »
hi, do you found a solution? I have the same problem
Virtuemart Customizing  ==>  Virtuemart Themes, Templates & Extensions -  Verry Nice!

mylearningspace

  • Beginner
  • *
  • Posts: 17
Re: Add to cart not working
« Reply #2 on: August 29, 2008, 02:27:41 am »
ajax add to cart bug is (still) a known issue on product pages with sh404SEF integration. workaround is this...

+go to virtuemart admin/configuration/site tab
+click 'configuration' link for chosen vm theme
+set 'use Ajax to add, update or delete products from the cart?' = No

Cheers,
Chad

J! 1.5.4
vm 1.1.2
sh404SEF 1.0.11.b147

Preston Moore

  • Jr. Member
  • **
  • Posts: 80
Re: Add to cart not working
« Reply #3 on: September 01, 2008, 07:50:36 am »
Since the Ajax add-to-cart is one of the coolest things about VM and convenient for shoppers wanting different variations of products, the "workaround" is a poor option.

How about a fix for this from someone?  This has to be a semi-important bug to work out.

Aravot mentions that this is fixed in VM 1.1.2 in this thread - http://forum.virtuemart.net/index.php?topic=39006.0...but it's not.  I'm using VM 1.1.2 and sh404 - add to cart doesn't work with sh404 enabled.
You can pick your friends, and you can pick your code, but you can't pick your friend's code.

bcnstony

  • Beginner
  • *
  • Posts: 15
Re: Add to cart not working
« Reply #4 on: June 27, 2009, 12:32:41 pm »
I too am having the same problem - with Virtuemart 1.1.3 and sh404SEF 1.0.20_Beta - build_237.

So I uninstalled sh404SEF and turned of SEF URL's in the Global Configuration - and the problem is still there!

The first time you click "add to cart" it works great and the Ajax window pops up. The second time the mini-cart updates, but no Ajax window!

Any suggestions? Thanks

sgoldsmithqc

  • Beginner
  • *
  • Posts: 1
Re: Add to cart not working
« Reply #5 on: December 10, 2009, 04:11:41 am »
hi all,

I work for an Apple Reseller and our websites 'add to cart' buttons no longer work.  Therefore any help that may be offered would be greatly appreciated.  www.pentagon.net.au


Sam

murphe

  • Beginner
  • *
  • Posts: 2
Re: Add to cart not working
« Reply #6 on: January 07, 2010, 07:11:16 am »
I fixed it! I hope this works for everyone, it worked for me. You must install and enable SH404SEF before you install virtuemart and cart.

If you have already setup products you can export your Tables in SQL with Drop table via the MySQL Admin and import them after uninstalling Virtuemart and enabling the SH404SEF Mod. You will still have to add pictures to each product but it is a small price to pay for a working cart. I spent many hours on this testing every scenario, going over 12 different joomla websites I've set up in the past. I guess the order really never occurred to me until I was at my wits end.

On many of my sites I set it up, show the user how to enter articles and get them indexing ASAP with the SEF mod enabled. Then I go back and add the Virtuemart and cart and get the background things going. This time I was setting everything up  for the client and they wanted me to enter the articles, hence the switch in order of installing add-ons. To top it off AJAX is working too!

Please reply if this helped you out!  ;D

brandon@getmobiletech.com
Become a fan!
http://www.facebook.com/pages/Springfield-MO/Brandon-Barnhart-GetMobileTechcom/110344017025

maheshrtl

  • Beginner
  • *
  • Posts: 4
Re: Add to cart not working
« Reply #7 on: January 22, 2010, 10:07:24 am »
thanks

aninka

  • Beginner
  • *
  • Posts: 11
Re: Add to cart not working
« Reply #8 on: February 11, 2010, 11:21:52 am »
Don't drop you tables or database it is not necessary.  THe problem is easily solved with just adding your website to the configuration file and to your store see http://support.mozilla.com/en-US/forum/1/424773 for details.  The problem exists only when you use Mozilla Firefox and should not be ther with IE, however this fix will work for all browsers.

It is very irresponsible for murphe to suggest to uninstall and rebuild your entire site when the fix is so simple.

ccraciun

  • Beginner
  • *
  • Posts: 5
Re: Add to cart not working
« Reply #9 on: April 13, 2010, 11:51:13 am »
Good point aninka.

I had the same issue, after redirecting non-www to www for my site. Everything was ok, except "add to cart" functionality and access to virtuemart component.

In backend, go to Components | Virtuemart | Admin | Configuration | Security and add www to your Site URL and Secure URL. This solved my problem!

ccraciun

  • Beginner
  • *
  • Posts: 5
Re: Add to cart not working
« Reply #10 on: April 13, 2010, 11:54:44 am »
One more thing. The problem was related also on browser type:
- when click to "add to cart" using Firefox, nothing happened
- when click to "add to cart" using Opera, i was redirected to Homepage.

Now it's solved! :) See the above post.

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Add to cart not working
« Reply #11 on: April 13, 2010, 20:28:18 pm »
If you're going to use www solution, you'll want to use .htaccess to force non www links to www.

You can use either non www for both URL settings in VM, or www with both. For some reason, using www seems to work better, but you might find your NON www links now do not add to cart. (just try yoursite.com instead of www.yoursite.com... you might find your add to cart doesn't work with that now... or your basket gets lost in checkout).

If so, make sure you apply this in .htaccess:
http://forum.virtuemart.net/index.php?topic=64548.msg215735#msg215735

efishant

  • Beginner
  • *
  • Posts: 2
Re: Add to cart not working
« Reply #12 on: May 07, 2010, 08:43:59 am »
Good point aninka.

I had the same issue, after redirecting non-www to www for my site. Everything was ok, except "add to cart" functionality and access to virtuemart component.

In backend, go to Components | Virtuemart | Admin | Configuration | Security and add www to your Site URL and Secure URL. This solved my problem!

Thank you ccraciun! worked for me. It was also keeping the description/images from changing when a new attribute was chosen.

All good now.

[N]

murphe

  • Beginner
  • *
  • Posts: 2
Re: Add to cart not working
« Reply #13 on: July 22, 2010, 06:41:46 am »

It is very irresponsible for murphe to suggest to uninstall and rebuild your entire site when the fix is so simple.


It may not be necessary to backup your data before doing the work I did - but it's certainly not irresponsible to backup my client's data.  The Mozilla fix IS indeed MUCH more elegant - but my fix worked for me and the backup I performed certainly was NOT irresponsible.  I have NEVER regretted backing up data before working on any system.


njanszen

  • Beginner
  • *
  • Posts: 1
Re: Add to cart not working
« Reply #14 on: February 27, 2011, 13:27:00 pm »
For everyone who still has problems with the Add-to-Cart button in Virtuemart:
- A common problem is that Virtuemart recognizes the domain with OR without www in front of it. You can check this by testing the button on www.yourdomain.com and yourdomain.com. If you see a difference here, try making a ReWrite in .htaccess.

How?
After RewriteEngine On, paste these rows and edit them correctly:

RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]

That's it.
And don't forget to backup this (hidden) file.
You can find it on your FTP server and select under View > Show hidden items.

Good luck.