AbanteCart Community

Shopping Cart Operations => Support => Topic started by: genie9464 on January 19, 2014, 07:55:04 AM

Title: Version 1.1.7 (php version 5.3.16) - Can not add an item (products) to the cart
Post by: genie9464 on January 19, 2014, 07:55:04 AM
Hello,

We installed the version 1.1.7. Unfortunately we can not add items/ selected products to the cart.
PHP-Version is 5.3.16

The website is: rmrisk.ch/_sd/shop/index.php?rt=index/home

Can you help us? May be version 1.1.7 have some problems with the php version.

Thanks for the support
Eugene
Title: Re: Version 1.1.7 (php version 5.3.16) - Can not add an item (products) to the cart
Post by: abantecart on January 19, 2014, 11:39:58 AM
You have JavaScript error on the page that caused by AJAX request that fails

http://www.rmrisk.ch/_sd/shop/index.php?rt=r/product/product/addToCart&product_id=52

This page request returns correct result, BUT return code from your server is 404. Check your server configuration to find out why this code is returned.

Also, you can apply JS fix below that can capture error better:
https://github.com/abantecart/abantecart-src/commit/10924a687f31bf78ba7597d4b047bd69433d264a




Title: Re: Version 1.1.7 (php version 5.3.16) - Can not add an item (products) to the cart
Post by: eCommerce Core on January 19, 2014, 12:49:20 PM
I get these:

[Error] Failed to load resource: the server responded with a status of 404 (Kategorie nicht gefunden) (t, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (favicon.ico, line 0)

these return statuses cause the problem
Title: Re: Version 1.1.7 (php version 5.3.16) - Can not add an item (products) to the cart
Post by: genie9464 on January 21, 2014, 03:53:19 AM
We solved the Ajax / Javascript Problem:
********************************

The domain (URL) of our executed page and requested domain (URL) name were different.

The javascript was doing xmlHttpRequest to different domain than our page is. So browser is blocking it as it usually allows request in the same origin for security reason. You need to do something different when you want to cross domain request.

The solution:
**********
We correct the Shop URL within system/ settings. There was another URL.
This URL should be exactly the same as the URL for your shop.