Adding "Add To Cart" to your own HTML pages.

Assuming you have your own button image and know the path/url to it, you would add the following in your page's HTML...

Code:
<a href="index.php?l=addtocart&product[id]=99&product[quantity]=1"><img src="images/buynow.gif" border="0" /></a>

Edit: Keep in mind that the path in this example is relative to where the shop files are. So if you are creating a link to the shop from the main/public folder on your site, and your SunShop installation is in a folder called "/sunshop", then the link would look like...

Code:
<a href="sunshop/index.php?l=addtocart&product[id]=99&product[quantity]=1"><img src="images/buynow.gif" border="0" /></a>

Obviously, you'd replace "99" with whatever your product's ID actually is. We suggest using relative paths, and you need to make sure the path you're using is correct. The above example assumes the image is in SunShop's main "/images" folder....though it can be anywhere you like.

  • 58 Users Found This Useful
Was this answer helpful?

Related Articles

Creating SEO URL's without generating HTML pages

1. Create an .htaccess or alter your apache config file to add the the following mod_rewrite...

Altering template text and language variables.

In this example we will alter the text in the Welcome Message template. Method 1: 1. In your...

Changing your shop logo.

To add or change the default logo within SunShop: 1. First login to the admin area of your shop...

Changing the default cart theme or skin.

To change the default theme or skin within SunShop: 1. First login to the admin area of your...

Adding additional pages within SunShop.

1. Login to your Sunshop administration area and go to "Settings" -> "Manage Templates". 2....