home  FAQ  : faq-netshop 

netShop FAQ

  1. How do I change the settings for Sales Tax?
  2. Can I add thumbnail Images?
  3. I've developed my own catalog pages, can I use the Shopping Cart to process my orders?
  4. How do implement color or style selections?
  5. Can I divide the inventory into separate pages?
  6. I just loaded some products into my netShop but they aren't sorted like I want them to be. How do I fix that?
  7. Can I sort products by an attribute (i.e. year, size, etc.)?
  8. Is the netShop compatible with my SSL account?
  9. Is there a way I can keep customers from accessing the order page if they don't have anything in the cart?
  10. How do I incorporate a shipping cost into the cart?
  11. Can I have separate shipping costs for each item?

1. How do I change the settings for Sales Tax?

Changing the sales tax will involve making a very simple edit to each of three files that control the sales tax function. The first two are index.html and nocookie.html. When first installed, these pages set the sales tax to a value of 5%, expressed in decimal format.

index.html:

Click <a href="cart.cgi?test=main.shtml&link-to=nocookie.html&set-cookie:tax=0.05">here</a>

nocookie.html:

Click <a href="cart.cgi?set-cookie:tax=0.05&link-to=main.shtml">here</a>

To change them simply replace the default tax value, shown in bold, with your own.

The next page to edit is checkout.shtml. This page includes a menu for selecting sales tax options:

<select name="tax">
<option <!--#exec cgi="cart.cgi?is-equal:tax=0.05&true=SELECTED&false=*" --> value="0.05">Maryland
<option <!--#exec cgi="cart.cgi?not-equal:tax=0.05&true=SELECTED&false=*" --> value="0.00">Out of state
</select>
Again, replace the default tax values, shown in bold, with your own.

2. Can I add thumbnail Images?

Yes. In fact, the netShop was designed with this and other features in mind. As discussed in the IC Tech. Ref. Document: netShop - V. The Catalog Pages, the rendering engine uses templates to build the page, which may use whatever HTML you desire. The template that is used in the cart catalog page main.shtml, is list.html. There are quite a few ways to add thumbnail images; here is perhaps the simplest:

  1. First, create thumbnail-sized images for each of your products.
  2. Next, name these thumbnails after the product numbers you've assigned. For example, if you have a product with an ID of 00012, name its corresponding thumbnail 00012.jpg.
  3. Finally, add this code to list.html: <img src="{id}.jpg">

When the shopping cart sees this code, it will replace {id} with the appropriate product number. The resulting code, in this case, would read, <img src="00012.jpg">.

Using variations on this example, you can achieve any number of effects. For example, add a hyperlink to the thumbnail like so:

<a href="{id}.html"><img src="{id}.jpg"></a>

Yet another way of doing this would require that you add an attribute for an image in your products file like so:

0125KF
	name=Kung Fu Masters Vol. 125
	price=2500
	fmt=DVD
	img=/images/kungfu-mastvol125.jpg

Then, like step three above, add corresponding code to list html. In this case: <img src="{img}">

When main.shtml is parsed (which will include list.html), the correct image would be displayed for the product.

3. I've developed my own catalog pages, can I use the Shopping Cart to process my orders?

Yes. The easiest way to do this is to use the pages you've built as a guide for the cart's main.shtml and list.html pages. Simply format these pages to follow the look and layout you've already created. For more information on these pages, please see the IC Tech. Ref. Document: netShop - V.The Catalog Pages.

4. How do implement color, size or style selections?

To implement color, size or style selections for products like clothing, you need to create separate products for each possible variation. So, for example, if you offer 1 t-shirt that is available in three sizes and three colors, you'd have a total of 9 items in your products file.

5. Can I divide the inventory into separate pages?

Yes, there are several different ways to do this.

  1. Categorization - The IC Tech. Ref. Document: netShop - V.The Catalog Pages discusses how you can split your inventory into categories within the cart. You can also integrate other scripts into the netShop to achieve this. netShop VIII. Cart Add-ons covers this and the example carts allow you to see both methods in action.
  2. Limit the number of products displayed per page - The best way to do this is to use a third-party script such as cartsearch.cgi. One of the example carts built by the Internet Connection staff, Kung Fu Movies version 2, does just that. For more information on using third-party scripts with the netShop, check out the IC Tech. Ref. Document: netShop VIII. - Cart Add-ons.

6. I just loaded some products into my netShop but they aren't sorted like I want them to be. How do I fix that?

By default, the products shown on main.shtml are sorted by their product IDs. This is controlled by the following tag on line 22 of main.shtml:

<!--#exec cgi="cart.cgi?catalog-products:mycart=list.html&SORTBY=id" -->

The bold text above is where you change the attribute to sort by (ID, name, price etc.) or add flags to modify the sorting behavior.

This is covered in the sorting section of the IC Tech. Ref. Document: netShop V. - The Catalog Pages.

7. Can I categorize my cart by product attribute (i.e. year, size, etc.)?

Yes, and there are two ways of doing this. The first requires you to make use of one of the two available arguments (FILTERIN and FILTEROUT) that modify the cart's catalog pages based on a portion of your product ID. This is covered in more detail in the IC Tech. Ref. Document: netShop V. The Catalog Pages.

Your second option is to employ a third-party script such as cartsearch.cgi which was used in one of the example carts, Kung Fu Movies version 2. This particular script allows you to categorize your cart by any product attribute.

For more information on using other scripts with the netShop, please see the IC Tech. Ref. Document: netShop - VIII. Cart Add-ons.

8. Is the netShop compatible with my SSL account?

Yes, in fact the netShop and your Internet Connection SSL account work very well together. The IC Tech. Ref. Document: netShop - VI. The Checkout and Order Pages details how to integrate a secure ordering process into your netShop.

9. Is there a way I can keep customers from accessing the order page if they don't have anything in the cart?

Yes, in fact one of the sample netShop add-on scripts, testcart.pl, allows you to do just that. For more information on this please see the IC Tech. Ref. Document: netShop - VIII. Cart Add-ons.

10. How do I incorporate a shipping cost into the cart?

Incorporating a flat shipping rate into your cart is fairly easy. Simply create another entry in the cookie that, by default, stores the tax information. Then, alter your checkout.shtml and order.shtml pages to figure that fee into the product totals.

This topic is discussed in more detail in the IC Tech. Ref. Documents: netShop - IV. The Welcome Pages and netShop - VI. The Checkout and Order Pages.

11. Can I have separate shipping costs for each item?

Yes, first create a new attribute in the products file for this. For example, here's an excerpt from a sample products file:

0125KF
	name=Kung Fu Masters Vols. 1-25
	price=10000
	fmt=DVD
	shp=2000
1125KF
	name=Kung Fu Masters Vol. 25
	price=500
	fmt=VHS
	shp=300

In the above, shipping (shp) for the two items shown is quite different. Next, alter your checkout.shtml and order.shtml pages to figure that fee into the product totals.

This topic is discussed in more detail in the IC Tech. Ref. Documents: netShop - IV. The Welcome Pages and netShop - VI. The Checkout and Order Pages.

Related Items

Email and Web Hosting by Internet Connection 2004-2007 ©
Contact IC Support via AIM!  Our SN is ICSupportDesk