How can I create an "Add to cart" button?

How can I create an “Add to cart” link on a completely separate external page?



What would be the URL for a particular product?

Hi Argentice…



It can be done, I stumbled across it by accident. Not the best way I admit but it did work, I also got the cart showing on an external page, but couldnt get it to intially display the products in the cart until I added one



Not that it was my intentions to use it…



Depending on how you want to lay it out whether its static content or not etc etc etc, view source of a page containing the product in question



Copy the code from the add to cart button.


```php











Add to cart




```

You will also need to ensure that the following is included in your external page

```php




```

As far as I can remember, thats all there was to it, I cant say for sure if its going to work as it was a few weeks back...

LOL, I was hoping it was going to be a simple link with a qty and product_id embedded…



But thanks very much, I shall take a look! :slight_smile:

Well it kind of is…



The 2nd lot of code is required otherwise you get undefined errors

The first lot, is just a link to be honest, but using CS’s version of a button wrapped in a load of tables :wink:

SWS, That’s good info, just curious, if you’re building a site that only references the store just for checking out and adding to cart, is this an acceptable way to do this. More specifically, will it carry over all of the data with it if the code you supplied is added page to page instead just on that one page? Or is that more advanced than what you were showing us.



Thanks in advance for any help, I replied here because it seems relevant to me with this post.

I would like to add a “checkout” button and a “view cart” button next to the “add to cart” button for all of my product. I don’t want my customers to have to search for the checkout button.



[url]safeplug.com - safeplug Resources and Information.



Any help with how I could add these buttons?



Thank you in advance for the help,



:slight_smile:



Adam

[quote name=‘argentice’]LOL, I was hoping it was going to be a simple link with a qty and product_id embedded…



But thanks very much, I shall take a look! :)[/QUOTE]



I’m looking for an add to cart link without the use of javascript. I need a simple link like [COLOR=“DarkRed”]mydomain.com/cart/index.php?mode=add&qty=1&product_id=5423[/COLOR] for example.



Would anyone happen to know how this is handled without javascript? Thanks!

Also if you go to your admin site and click on Look and Feel > Site Map here you will see a list of links or just one link maybe, regardless if you click edit links beside the link that is showing you can see the other links to the shopping cart, view cart etc.



Just looking through the thread and checking to make sure you got an answer, I just use "index.php?target=cart" for the view cart and index.php?target=checkout for checkout. I made buttons or text links for them wherever I needed them.


[quote name=‘abender’]I would like to add a “checkout” button and a “view cart” button next to the “add to cart” button for all of my product. I don’t want my customers to have to search for the checkout button.



[url]safeplug.com - safeplug Resources and Information.



Any help with how I could add these buttons?



Thank you in advance for the help,



:slight_smile:



Adam[/QUOTE]

Awesome!! Thank you very much. Works perfectly. That pretty much solves the final problem with my mobile site. Thanks!



Jim