Author Topic: "Add to Cart" function not working  (Read 11018 times)

Mistergroz

  • Beginner
  • *
  • Posts: 1
Re: "Add to Cart" function not working
« Reply #15 on: November 24, 2009, 08:18:45 am »
Same problem here, too,as I could not "add to cart" when coming into the site from different computers.  Changing/putting the www in the site and security url's worked (done in vm under configuration/security/security settings/"site" & "security" url in VM. Thank you,very much.

However, I did need to force www via .htaccess before I changed my vm settings, as my site was built on a different server than where my domain is being hosted, which is why is worked on the computers I was using to build it, but not on others. (I also disabled cookies first, thinking that was the problem).

Edited the httaccess.txt file on my root folder by placing this:

Code:
#Rule for duplicate content removal : www.domain.com vs domain.com
RewriteCond %{HTTP_HOST} ^yourhostwithnowww.com/ [NC]
RewriteRule (.*) http://www.mysitewithwwwnowinfront.com/ [R=301,L,NC]

"Directly below this"

Code:
# mod_rewrite in use

RewriteEngine On

And then saving it to the server as .httaccess. I then changed the vm setting as described above to  reflect my site name (dont forget the "/"  at the end of your URL) and it worked great.

Hope this helps. My first post here, and my firt VM site. Not a techie, just trying to be one and hope this helps someone else.

Good Luck,
M

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27431
  • Always on vacation
    • Jenkin Hill Internet
Re: "Add to Cart" function not working
« Reply #16 on: November 24, 2009, 09:54:09 am »
Hope this helps. My first post here, and my firt VM site. Not a techie, just trying to be one and hope this helps someone else.

Thank you, an excellent post. Good luck with the store.
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 VM 3.4.3.10057 on Joomla 3.9.8 PHP 7.0.33
Testing VM .3.6.0.10075 on Joomla 3.9.8