henkedo Posted December 14, 2012 Share Posted December 14, 2012 (edited) Hi all. I have a problem on production server, hosted by OVH. Apache, PHP v5.3.16 , PS v 1.5.2 Default theme. When I have Friendly URLs turned OFF the blockcart module Ajax add to cart works fine, with the image moving to to Cart graphic etc... Friendly URls turned ON : CLick add to cart button on Product page. A modal pops up: Impossible to add the product to the cart. textStatus: 'parsererror' errorThrown: 'SyntaxError: JSON.parse: unexpected character' responseText:[ **** SOME HTML **** ] From FireBug Console: POST http://id-pharm.com/ controller=cart&add=1&ajax=true&qty=1&id_product=1&token=a92eb22d2ccd6bc84754017a7bd83b84&ipa=14 So this tells me that the Homepage gets served and not the blockcart-json, of course this is'nt JSON but HTML so the parsing fails. Conclusion : url_rewrite issue!! I have tried rebuildinig the .htaccess but no change, interestingly all pages work as expected when browsing site, so friendly urls seem to work fine except for when I have exact copy of the site on my local server and everything works as expected. Edited December 14, 2012 by henkedo (see edit history) Link to comment Share on other sites More sharing options...
henkedo Posted December 14, 2012 Author Share Posted December 14, 2012 Writing the above post gave me some ideas.... problem solved! Turns out the default OVH index.html file was the culprit, in fact this file was served instead of index.php as the rewrite rules directs to http://domain.com and not explicitly http://domain.com/index.php So my bad , kinda... thx .henkedo 1 Link to comment Share on other sites More sharing options...
Creative Allsorts Posted June 12, 2014 Share Posted June 12, 2014 Writing the above post gave me some ideas.... problem solved! Turns out the default OVH index.html file was the culprit, in fact this file was served instead of index.php as the rewrite rules directs to http://domain.com and not explicitly http://domain.com/index.php So my bad , kinda... thx .henkedo Thanks, this solved my problem also, read somewhere else that it was the paypal app but when that didn't work I read this and it ended up being the index file. Link to comment Share on other sites More sharing options...
Servicios MC Posted June 12, 2014 Share Posted June 12, 2014 Thank you very much Link to comment Share on other sites More sharing options...
indesit Posted December 17, 2014 Share Posted December 17, 2014 Hi! Someone please explain to me once again, it's not clear. I have same problem - adding to cart is not working after migrating to another hosting. What should I do to fix the cart? Thanks! Link to comment Share on other sites More sharing options...
gregory.budin Posted June 5, 2015 Share Posted June 5, 2015 Writing the above post gave me some ideas.... problem solved! Turns out the default OVH index.html file was the culprit, in fact this file was served instead of index.php as the rewrite rules directs to http://domain.com and not explicitly http://domain.com/index.php So my bad , kinda... thx .henkedo HEllo! Seems that I have the same error. Could you please explain how to resolve the problem? step by step Link to comment Share on other sites More sharing options...
ican Posted August 31, 2018 Share Posted August 31, 2018 On 12/14/2012 at 6:12 PM, henkedo said: Writing the above post gave me some ideas.... problem solved! Turns out the default OVH index.html file was the culprit, in fact this file was served instead of index.php as the rewrite rules directs to http://domain.com and not explicitly http://domain.com/index.php So my bad , kinda... thx .henkedo I'm facing same issue on quantity update and on change of any attribute. Where can i find index.html file and index.php file? And how to fix it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now