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

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Add to cart not working
« Reply #15 on: March 10, 2011, 02:43:25 am »
See my post above, as using the rewrite rule njanszen posted will not work for SSL.

Siddharth

  • Beginner
  • *
  • Posts: 1
Re: Add to cart not working
« Reply #16 on: March 11, 2011, 13:07:23 pm »
Hi ALL,
due to the problem of add to cart button , I have disabled the Ajax from there . Now , The button is working in every browser .
But I am facing a new a problem , i.e. when you click the ADD TO CART Button , the quantity of the product is updated . It is happening not all the time , But it after some time , it works like this ..................................................................

Can nyone help me with this issue ??????????????? plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz ????????????

erik88

  • Beginner
  • *
  • Posts: 15
Re: Add to cart not working
« Reply #17 on: April 11, 2011, 00:15:31 am »
Thanks njanszen!

Your reply was helpful for me!

nolin11

  • Beginner
  • *
  • Posts: 1
Re: Add to cart not working
« Reply #18 on: April 27, 2011, 23:39:09 pm »
Hi,
It's my first post (in reality I just registered to write solution, and I probably won't visit this page again for some time...)

The problem for not working "add to cart" is really simple with mod_rewrite turned on, and it is "relative script paths" and solution for this is very simple too. To do this there is need to only add slash in JavaScript file in function which is called when form is submitted.

To be precise in line when is created Ajax object witch send query.

Some example :), this is no good line ( file theme.js in com_virtuemart theme dir):
Code: [Select]
new Ajax('index2.php?ajax_request=1', opt).request();
I have corrected this to (and other places where the shlash was missing):
Code: [Select]
new Ajax('/index2.php?ajax_request=1', opt).request();And that solved problem not working Add to cart button.

Ofc I have corrected this in all js files I found in theme.


Ps. sorry for my English

yanivs

  • Beginner
  • *
  • Posts: 1
Re: Add to cart not working
« Reply #19 on: May 27, 2011, 05:17:53 am »
Hi,
Wow, thanks so much, I just could not finger why it happens on some comuputer and on some dont... simply I always loaded the site from the address bar history, and each computer saved it differently - some with www, some without. amazing:) thanks!

One question - for me it only works without www. I know I can make a rewrite rule for it, but I prefer my site with WWW. Is there a way I can change it so it will work with www and not without?
thanks :)

marympemps

  • Beginner
  • *
  • Posts: 1
Re: Add to cart not working
« Reply #20 on: July 14, 2011, 13:25:20 pm »
I had the same problem. The add to cart button did not work in mozilla, but it did in iexplorer. I have not redirected my site to www because I like it without www! The solution was to click NO in the use of Ajax for the cart from the backend administration options in virtuemart. Now it works.