Author Topic: Cannot add products to cart  (Read 20392 times)

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28303
  • Always on vacation
    • Jenkin Hill Internet
Re: Cannot add products to cart
« Reply #15 on: January 22, 2012, 13:07:35 pm »
ethosws, it is a server problem with ModSecurity. See http://www.modsecurity.org/documentation/modsecurity-apache/1.9.3/html-multipage/03-configuration.html

If you are using Apache you may be able to turn off ModSec in .htaccess but be careful about doing that. It is usually installed on the server for a reason!  See http://www.tipsandtricks-hq.com/apache-mod-security-update-how-to-fix-error-406-or-not-acceptable-issue-259
Alternatively, if it is your server you can modify conf/modsecurity.conf - or ask the host to is you show them the problem.
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

Kschuler

  • Beginner
  • *
  • Posts: 21
Re: Cannot add products to cart
« Reply #16 on: January 22, 2012, 21:42:01 pm »
J1.7
VM2.0
I am still having problems with my add to cart button.  jenkinhill, I have seen you reference the same link for this problem, but it does not seem to help me.  In another post someone told me that my slider was using javascript and so was virtuemart so it wouldn't work.  I have found out how to disable jquery in virtuemart, according to jenkinhill's link but that didn't help my problems with my cart acting bad.  I can't see how to turn off jquery for the slider.  Do I have to delete some files?  Do I have to add something in to a file somewhere? and if I do then where?  What file?  Every template that I see it has a slider.  I like the image sliders and would like to have both to show products that are on a weekly sale. 

I am having such a hard time with this.  Any suggestions greatly appreciated.  Here is the site www.thegrowshopllc.com

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10431
  • VirtueMart Version: 3+
Re: Cannot add products to cart
« Reply #17 on: January 23, 2012, 02:41:48 am »
Kschuler, if you want people to help you have to post a url.

With things like these it could be 1, out of 10,000 things. Nobody is going to post that many times. But it can be spotted within 2 minutes of looking at the site.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28303
  • Always on vacation
    • Jenkin Hill Internet
Re: Cannot add products to cart
« Reply #18 on: January 23, 2012, 09:38:54 am »
Kschuler, please do not add your issue to this thread when it is already being discussed in another.
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

edv

  • Beginner
  • *
  • Posts: 6
Re: Cannot add products to cart
« Reply #19 on: January 23, 2012, 17:24:58 pm »
ethosws, can you give us information about your server/system? It could help to find a solution to the "NetworkError: 406"
Windows IIS 6 / 7, Linux Apache, Mac OSX Apache ... maybe firewall system?

Regards


millermulti

  • Beginner
  • *
  • Posts: 14
Re: Cannot add products to cart
« Reply #20 on: February 07, 2012, 16:47:51 pm »
Same problem here. As soon as I view a product description page I get the 406 error which in turn stops the Add from Cart button from working.
System: Linux, PHP 5.2.11, Apache 1.3.41
Joomla 1.7.4, VirtueMart 2.0.0
SEF Disabled, All straight install, no modifications, no sample data, no Javascript errors, jQuery from Google is loaded.
Error on GET index.php?option=com_virtuemart&nosef=1&view=productdetails&task=recalculate&format=json&customPrice%255B0%255D%255B7%255D%3D10%26quantity%255B%255D%3D1%26option%3Dcom_virtuemart%26view%3Dcart%26virtuemart_product_id%255B%255D%3D1%26virtuemart_manufacturer_id%3D2%26virtuemart_category_id%255B%255D%3D1

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28303
  • Always on vacation
    • Jenkin Hill Internet
Re: Cannot add products to cart
« Reply #21 on: February 08, 2012, 10:49:47 am »
millermulti J1.7 requires a minimum PHP5.2.4 and Apaache 2.x  ( http://www.joomla.org/technical-requirements.html )
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

millermulti

  • Beginner
  • *
  • Posts: 14
Re: Cannot add products to cart
« Reply #22 on: February 09, 2012, 17:43:11 pm »
jenkinhill, thanks for pointing that out. Talked with the server admin last night and they updated all server software. Apache 2.2.21, PHP 5.3.10
I'm still getting the error. Tried the htaccess option with no luck. I'll see if the system admin can look at the security settings and see if there is someway around this.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10431
  • VirtueMart Version: 3+
Re: Cannot add products to cart
« Reply #23 on: February 09, 2012, 19:57:32 pm »
millermulti, how can someone help without a url?

millermulti

  • Beginner
  • *
  • Posts: 14
Re: Cannot add products to cart
« Reply #24 on: February 09, 2012, 20:49:06 pm »
BanquetTables.pro, If the site had a public domain, I would share it. The site is under development and not public yet. This is why I am sharing as much information in regards to the issue as possible. I am pursuing jenkinhills suggestion on looking at the ModSecurity on the server. I'll post when I have results.

chocovo

  • Beginner
  • *
  • Posts: 6
Re: Cannot add products to cart
« Reply #25 on: February 10, 2012, 18:21:51 pm »
Hello,

I'm using Joomla 1.5.25 and Virtuemart 2.0.

I have the same problem, when clic on "add to cart", nothing happen but in my case I know where is the problem.

In my case it is due sh404Sef. If I turn off this component "add to cart" work again.

Some Idea to have friend urls with virtuemart?

Regards.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10431
  • VirtueMart Version: 3+
Re: Cannot add products to cart
« Reply #26 on: February 10, 2012, 18:56:02 pm »
Hello,

I'm using Joomla 1.5.25 and Virtuemart 2.0.

I have the same problem, when clic on "add to cart", nothing happen but in my case I know where is the problem.

In my case it is due sh404Sef. If I turn off this component "add to cart" work again.

Some Idea to have friend urls with virtuemart?

Regards.

yes, it works with standard joomla SEF.

NO reason at all to have another sef component

millermulti

  • Beginner
  • *
  • Posts: 14
Re: Cannot add products to cart
« Reply #27 on: March 05, 2012, 22:46:18 pm »
OK, partially solved. I have been going back and forth with the system admin. They mentioned adding the following to the very top of the .htaccess file to disable mod_security, an Apache firewall module. I did with no luck.
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
I then found this posting in regards to the double encoding issue: http://forum.virtuemart.net/index.php?topic=95654.0
I edited components/com_virtuemart/assets/js/vmprices.js and replaced the two instances of ",encodeURIComponent(datas)," with ",data,"
I can now add items to my cart. The only downside so far is that when I first load a product page and look for errors with Firebug, I am seeing a 500 internal server error, on the upside this error is not causing the page to stop working.