The simplest method for adding items to a cart is by using a conventional hyperlink with the details of the item appended onto the end of the URL. Like any other hyperlink, what you click on can be text or an image. It always takes the following form:

<a href="">

You can use HTTPS in the URL if your website is hosted under SSL.

What goes after the "add.cfm?" is your Username plus the description and price of the product. The syntax for data in a hyperlink is field_name=a_value and the pairs are linked together with the & characters. If you have a product "North Atlantic Marine Chart" priced at $29.50 and your username is gg12345 the final link to add the product to the cart is:

<a href=""> Buy Now </a>

You can also set the quantity, a return URL for the Continue shopping button and a value for calculating shipping:

  • qty = a_number (default = 1)
  • return = (default = none)
  • units = a weight or other value for calculating shipping (default = 0)

The return link is usually either your home page or the page the customer has just come from. Don't include an http:// in the value

Important points:

  • There should be no spaces in the link (use + or %20 to create a space instead)
  • The link should be on one line of html code
  • DO NOT use the & character in your product descriptions - it is used to join up the fields
  • It doesn't matter what order you put the fields
  • Field names are case sensitive and are all lower case letters