SurfShopCart Documentation

Setting Up Shop Has Never Been Easier!

User Tools

Site Tools


linking_to_surfshop

Easy Method

The easiest way to get into the store is to place a link to “shop.cgi” somewhere on your site and let the program do all the work. The URL will look like this: https://www.your-store-domain.com/cgi-bin/surfshop/shop.cgi That’s it!

Advanced Examples

If you want to set up individual order buttons for specific items on specific pages:

• In all of these examples, replace [itemid] with the actual Item ID code of the product you wish to link.

Form method to add to cart and view cart contents:

<form action="/cgi-bin/surfshop/shop.cgi" method="get">
<input type="image" src="/graphics/addtocart.gif" name="addToCartButton" alt="ADD TO CART">
<input type="text" name="i_[itemid]" value="1" size="3">
<input type="hidden" name="c" value="viewcart.htm">
</form>

Form method to add product with an option to cart and view cart contents:

<form action="/cgi-bin/surfshop/shop.cgi" method="get">
<input type="submit" name="submit" value="BUY">
<input type="submit" name="i_[itemid]" value="1" />
<input type="hidden" name="itemid" value="[itemid]" />
<input type="hidden" name="option1_[itemid]" value="[option1]" />
<input type="hidden" name="c" value="viewcart.htm" />
</form>

Form method to add to cart and load product detail page with confirmation:

<form action="/cgi-bin/surfshop/shop.cgi" method="get">
<input type="submit" name="submit" value="BUY/VIEW ITEM">
<input type="text" name="i_[itemid]" value="1" size="3" />
<input type="hidden" name="itemid" value="[itemid]" />
<input type="hidden" name="c" value="detail.htm" />
</form>

Form method to load product detail page:

<form action="/cgi-bin/surfshop/shop.cgi" method="get">
<input type="submit" name="submit" value="VIEW ITEM">
<input type="hidden" name="itemid" value="[itemid]">
<input type="hidden" name="c" value="detail.htm">
</form>

“[itemid]” corresponds to the item id of the product being linked. You must first enter the item in your catalog database.

Form method to view current cart:

<form action="/cgi-bin/surfshop/shop.cgi" method="get">
<input type="submit" name="submit" value="VIEW CART">
<input type="hidden" name="c" value="viewcart.htm">
</form>

Form method to load check out form:

<form action="/cgi-bin/surfshop/shop.cgi" method="get">
<input type="submit" name="submit" value="CHECK OUT">
<input type="hidden" name="c" value="info.htm">
</form>

Form method to return catalog items matching a keyword:

<form action="/cgi-bin/surfshop/shop.cgi" method="get">
SEARCH CATALOG keywords:
<input type="text" name="searchtext" value="">
<input type="hidden" name="setSearchBox" value="searchtext">
<input type="submit" name="submit" value="Find">
<input type="hidden" name="c" value="search.htm">
</form>

If you want to add a category drop-down menu to the above search form, you can cut and paste the HTML from your catalog admin page. It is located toward the bottom of the page and is labeled “Category HTML”. You will need to update any forms you create if you change your category list. For this reason, we do not recommend “hard-wiring” a category drop-down unless you are willing to stay on top of it as your site changes.

Form method to include a category drop-down menu:

<form action="/cgi-bin/surfshop/shop.cgi" method="get">
SEARCH CATALOG Category:
<select name="categories"><option value="">Choose One</option>
<option value="9992">Accessories</option>
<option value="9995">Toys</option>
<option value="9995-9993"> - Cat Toys</option>
<option value="9995-9994"> - Dog Toys</option>
<option value="9998">Food/Treats</option>
<option value="9998-9996"> - Cat Food</option>
<option value="9998-9997"> - Dog Food</option>
</select>
<input type="hidden" name="c" value="search.htm">
</form>

Lastly, all of the above methods can be duplicated using a “Query-String” method. These will create a link that you can place on your static web pages. As shown in example 2, you do not need to enter your entire URL for these to work. Here are some examples:

Query-String method to add to cart and view cart contents:

<a
href="https://www.your-store-domain.com/cgi-bin/surfshop/shop.cgi?c=viewcart.htm&amp;i_[itemid]=1">
Add to Cart</a>

Query-String method to load product detail page:

<a href="/cgi-bin/surfshop/shop.cgi?c=detail.htm&amp;itemid=[itemid]">View Item</a>

See the “Advanced Features” section for more examples. Also see 'Forms, Form Data, and Query-Strings' under the “Web Essentials” section

linking_to_surfshop.txt · Last modified: 2018/08/13 00:15 by kinetic8sp