Adding Item To Cart Via Api

Is it possible to add product to cart with API? I am trying to integrate a system with CS-Cart. User can add product to his cart without visiting shopping cart site.

Yes , add to cart possible with api , but by defaul at not available in cscart , additional code required for this .

http://docs.cs-cart.com/4.3.x/developer_guide/api/entities/carts.html

Actually carts are tied to sessions so if user doesn't have an account (where it can then be tied to user_id but you'd never know what it is remotely) then when the user comes to the site, it will be there if they have the same session id as the cart was created in, otherwise it will not be visible to them.

We have a very old (but still works) free snippet that can be used by remote sites to add items to a cart and either take the customer to the cart or directly to checkout. You can also apply a coupon code to the cart if you know it.

The snippet is located at: http://ez-ms.com/private/unsupported_scripts/checkout.pre.php.txt

Example for adding quantity 3 of a product with product_code ABC and coupon code XYZ to a cart and taking the user directly to checkout would be:

http://yourdomain.com?dispatch=checkout.remote_checkout.ABC.3&c_code=XYZ

Actually carts are tied to sessions so if user doesn't have an account (where it can then be tied to user_id but you'd never know what it is remotely) then when the user comes to the site, it will be there if they have the same session id as the cart was created in, otherwise it will not be visible to them.

We have a very old (but still works) free snippet that can be used by remote sites to add items to a cart and either take the customer to the cart or directly to checkout. You can also apply a coupon code to the cart if you know it.

The snippet is located at: http://ez-ms.com/private/unsupported_scripts/checkout.pre.php.txt

Example for adding quantity 3 of a product with product_code ABC and coupon code XYZ to a cart and taking the user directly to checkout would be:

http://yourdomain.com?dispatch=checkout.remote_checkout.ABC.3&c_code=XYZ

Thank you for your response. I could not open snippet link.

Try using: http://ez-ms.com/private/unsupported_scripts/checkout.pre.tgz

Something doesn't seem to like .php in the filename anywhere

Try using: http://ez-ms.com/private/unsupported_scripts/checkout.pre.tgz

Something doesn't seem to like .php in the filename anywhere

Thank you. I guess I can handle this issue with AJAX request.

Probably not since AJAX will probably not have session id associated with it. So it may be in a cscart_sessions table, but there will be no way to associate the user to the session once they get to the cart.

Good luck.