![]() | Welcome to Islandnet.com Locally owned and operated since 1993 |
| Create an Account • Pricing & Features • Domain Registration • Customer Sites • Help & Info | |
Friday May 16 2008 | |
Create Store pagesBasic Form LayoutThe store page (or pages) is where the customer selects a product to buy and adds it to his or her shopping basket. These are normal HTML files that contain one or more input forms. Each input form can submit one or more products to the shopping basket. The simplest input form might look like this:
p1 - Price (a number with NO currency symbol) The number 1 refers to the fact that it is the first product in the form. If you want to submit a second product to the basket in the same form, simply add p2, c2, d2, and q2 fields. You can submit as many products via a single form as you'd like. They must be sequential though, you can't skip a number (so if you remove a product from the middle of a form be sure and renumber the fields!) Of course any of the fields could be actual input fields instead of hidden values, although only the quantity value would really make any sense that way. Adding Product Options You can add user-selectable options (size, color, etc) by adding two extra fields:
To add a second option to the same product, use o1-2 and v1-2 and so on. If you have multiple products per form AND multiple options per product the numbering can get a bit confusing, so take your time. Product Options That Affect the Price An option can also affect the price of a product. For example, T-Shirts might cost $14.95 in all sizes except XL which is $16.95. Rather than create a separate input form for the XL shirts, simply create an option list that looks like this:
Prices Based on Quantity It is also possible to have products with a price that varies based on quantity. For example, let's say you sell pens. They are priced at $1.00 each in quantities under 500, $0.75 in quantities of 500-1500, and $0.50 in quantities over 1500. All you need to do is change the "p1" field like so:
Shipping and Tax Exemptions By default every product is assumed to be taxable. You can control (on a per item basis) which products should be included in tax calculations by defining the "f1" field, which stands for "flags". For example, to indicate that a product is exempt from GST and HST calculations, add the following line to the form:
g - Item is GST exempt Remember that these "exemptions" are based on the individual items and do not override the basket settings themselves. An example would be; If you've configured your shipping to charge basic shipping for the entire order, setting f1="s" would not affect it. If you were charging shipping strictly based on a percentage of sub-total or by weight, then the items set with f1="s" would not trigger the shipping calculation. Shipping Based on Weight If you refer to the config file description you'll note that you can define shipping and handling charges that are based on the total dollars or the total "weight". By default the "weight" of an item is assumed to be zero. To define a weight so that you can calculate weight-based shipping, add a line like the following:
Conditional Additions There may be cases where you want a product to be added based on the value of another form variable. For example you might require that a customer selects a checkbox or radio button to select a product. You can do this with the "x" parameter, like this:
Clickable Product Descriptions You can optionally provide an URL for each product. If you do then the product description in the basket contents display will be clickable, allowing customers to jump directly to the URL. Simply add a line like this:
You can optionally provide an URL for each product that points to an image that will be displayed along side the product description. There is no restriction on image size, although you'll want to use tiny ones so you don't disrupt the "look" and annoy customers. This image will also be clickable if you provided a product URL (see above).
You can make the shopping basket display a file when a product is added. This might be a notice about the product, or it might be another form that prompts the customer to buy a related product. To do this add a line like this:
NOTE: This assumes that you are NOT using the "jump" value to bypass the basket contents display. Making One Product Dependent on Another In our demo store you can optionally buy a colour scanner when you purchase a computer system. But what happens if you then delete the computer from your basket? We don't want to sell the scanner by itself, so we create a product dependency which essentially says: if the computer is deleted, also delete the scanner. It's done by modifying the product code for the computer as follows:
In the config file you defined a default URL to send the customer to when they click the "Continue" button while viewing the basket contents. There may be times when you want to override this default and have them go to another URL. You can override the CON config option temporarily by adding one hidden value to your input form like this:
If you don't want the customer to have to view the basket contents every time they add something, you can add another hidden form field that will cause them to jump to another URL immediately after adding something to their cart. Like this:
If you need to use multiple shopping baskets in the same account, you will most likely want to use a different config file with different settings. To accomplish this all you need to do is add one extra hidden form value to each input form that calls inBASKET (including the order form itself!):
Form Variable ListThis is a list of all the form values you might use. The capital X should be replaced with a different number for each product listed in the form, starting at 1. The capital N should be replaced with a different number for each product option, starting at 1. Any other form values will be ignored, unless it is referenced in a xX value.
dX - Product description (required)
Miscellaneous InfoSometimes it is convenient to have a link or button that doesn't actually add anything, it just takes the customer to the basket view page. You can do that like this:
Likewise you can embed the current number of items in the basket using the following code:
Used in combination with the "jump" feature you can implement "Buy One Now" scenarios where the customer can buy a single item immediately without going through the basket display process.
<< BACK |
| Home • About Us • Contact Us • Terms of Use • Privacy Policy • Help Documents |
| Page generation time: 0.02 seconds |