colobosya Posted August 10, 2010 Share Posted August 10, 2010 Hello,I have exception thrown from ajax-cart.js every time I try to add a product to a cart. TECHNICAL ERROR: unable to add the product.Details:Error thrown: [object XMLHttpRequest]Text status: parsererrorthe product did not have any attributes to it. Quick search on the forum showed that most people have fixed it by disabling AJAX. Did AJAX work for anybody at all? Is there any other way to fix it? How do I disable AJAX? Link to comment Share on other sites More sharing options...
rocky Posted August 10, 2010 Share Posted August 10, 2010 I haven't encountered that error message since PrestaShop v1.1. I've never had any problems in PrestaShop v1.2.5 and v1.3.1. Make sure that you all the files in your theme are the ones from the default v1.3.1 theme. To disable AJAX, go to Modules > Categories block (in the Blocks section) > Configure and change "Dynamic" to X, then click Save. Link to comment Share on other sites More sharing options...
ktross Posted August 10, 2010 Share Posted August 10, 2010 This is caused by an invalid json file. It's likely that you have single quotes in a product name or description. Try changing line 13 in /modules/blockcart/blockcart-json.tpl to this: "name": "{$product.name|html_entity_decode:2:"UTF-8"|replace:"singlequote":""|addslashes|truncate:15:"...":true}", The code block above wouldn't display it properly so you have to change singlequote to ' Link to comment Share on other sites More sharing options...
enagen Posted March 21, 2011 Share Posted March 21, 2011 This is caused by an invalid json file. It's likely that you have single quotes in a product name or description. Try changing line 13 in /modules/blockcart/blockcart-json.tpl to this:"name": "{$product.name|html_entity_decode:2:"UTF-8"|replace:"singlequote":""|addslashes|truncate:15:"...":true}", The code block above wouldn't display it properly so you have to change singlequote to ' Please.. The blockcart-json.tpl doesn't have this code! so i can't substitute any code 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