direct Add to Cart button outside of cs cart

Is it possible to add a direct “Add to Cart” link on a separate html page outside of the shopping cart system so that the user is directed to the shopping cart contents page with the item in the cart when they click Add to Cart?



Where would I find that direct link?



Thanks in advance for your help!

I know this thread is old, but I thought I would add to the post in case someone else is looking for the answer. It took me a while, but I found it here:

[url]http://forum.cs-cart.com/showthread.php?t=8906[/url]



I used this code and it worked beautifully:


```php












```

If you had it dispatch to a controller such as my_changes.add_to_cart.code

Where ‘code’ was the product code then it would be portable across instances of the cart and you wouldn’t have to know the database defined product_id.



in addons/my_changes/controllers/customer/my_changes.php you would check that the mode was ‘add_to_cart’ and then lookup the product code from the DB getting the product_id. Then simply redirect to checkout.add..



If one ever needed to rebuild your products in the cart, you wouldn’t want to be dependent on the product_id. That should only be determined dynamically and not used in external links.



Just 2 cents…