web design and hosting
features and pricing my account customer support about ICG Link, Inc. contact ICG Link, Inc.

NetMerchant Discounts
   
 
 
The Netmerchant shopping cart is capable of handling many types of specials and discounts. Here are some examples of how to use some of these features: Discount Based on Subtotal

If you would like to provide a discount based on the amount your customer spends, you can use NetMerchant's calculation feature.

First, you might add a variable like <input type="hidden" name="x_discount" value="mydiscount"> to your shipping or billing page. NetMerchant will look for a file called mydiscount.calc to determine what calculation to use. The value <! x_discount> could be used on subsequent pages to display the credit. The amount is automatically subtracted from the total. The file discount.calc might look like this:
BySubtotal
49.99      0
99.99      -5
199.99     -10
over       -20
Coupon Based Discounts

You may want to offer a special discount based on a code that a consumer finds in an ad or one that is given to them because of their status as a wholesaler or volume purchaser. You can easily use NetMerchant's calculation feature for this purpose.

Start by adding a text box on your billing page where the visitor can enter the coupon number. The text box might be given a name with v_ to designate the text box as optonal. Then you will need a hidden field to call the appropriate .calc file. Here's an example of how it might look:

<input name="v_code" type="text">
<input type=hidden name="x_coupon" value="code">

Lastly, you must create the .calc file, code.calc in our example, and it might look something like this.
byfield v_code
X1A4	-20%
9AY6	-10%
ATP2	-5%
XDP1	-20%
If the visitor enters a coupon number that is in the list, the appropriate discount will be applied.

Buy One Get One (Free or Discounted or Whatever)

You may want to offer a special discount or a free giveaway or even a catalog based on the purchase of a certain item or items. You can tell NetMerchant about your specials by placing instructions in a file called B1G1.sale in your www/data/shopname folder. Because the instructions can become quite arcane, we have built a special tool for formulating such logic. To access the tool, visit the following URL:
https://secure.icglink.com/cgi-bin/generate_sale.pl
All items added using this method must exist in the data file and must begin with an exclamation point "!". The tool allows you to automatically add a special discount or promotional item to the cart whenever a shopper buys an item or combination or items specified:

Here are some examples:
  • Buy any item, add a free printed catalog to the order.
    • new line in the data file: !catalog<-TAB->Free Catalog<-TAB->0.00
    • sale logic using the tool: If a shopping cart for the store named shopname at www.domainname.com contains a quantity of 1 of any item in our store, THEN automatically add 1 of item number !catalog to the cart. Apply this special a maximum of 1 times per cart. Allow shopper to remove the added item from the cart. Text for the button = No Thanks
  • Buy any 2 cd's and get a free t-shirt (assumes all cd's in the .data file start with a common identifier: "CD" in this example)
    • new line in the data file: !tshirt<-TAB->BONUS - Free e-Tunes T-Shirt!!<-TAB->0.00
    • sale logic using the tool: If a shopping cart for the store named testshop at www.icglink.net contains a quantity of 2 of any item #s starting with CD THEN automatically add 1 of item number !tshirt to the cart. Apply this special a maximum of 1 times per cart. Allow shopper to remove the added item from the cart. Text for the button = Decline
  • For every 2 cd's purchased, get a third one free (assumes all cd's in the .data file start with a common identifier: "CD" in this example and are all the same price)
    • new line in the data file: !cddiscount<-TAB->Discount - Every third CD free<-TAB->-12.99
    • sale logic using the tool: If a shopping cart for the store named testshop at www.icglink.net contains a quantity of 3 of any item #s starting with CD THEN automatically add 1 of item number !cddiscount to the cart. Apply this special a maximum of 10000000 times per cart. Do not allow shopper to remove the added item from the cart.
  • If a shopper buys jacket # JK492 or rain parka # PK4922 in addition to a basic t-shirt # TS0001, give him/her $10 off his/her order
    • new line in the data file: !DISC0001<-TAB->SALE - Ten Dollars Off<-TAB->-10
    • sale logic using the tool: If a shopping cart for the store named testshop at www.icglink.net contains a quantity of 1 of item # JK492 OR 1 of item # PK4922 AND 1 of item # TS0001 THEN automatically add 1 of item number !DISC0001 to the cart. Apply this special a maximum of 1000000 times per cart. Do not allow shopper to remove the added item from the cart.
Note: If you choose not to include a submit button for altering cart quantities within your itemloop tags, you will need to include <! DECLINEBUTTON> in order to allow your shoppers to remove a B1G1 sale item from their cart.

Minimum Order Value

Sometimes it is necessary to disallow orders less than a certain dollar value. If this is the case, add f_minorder as a hidden field in the form on basket.html. The numeric value assigned to this hidden field will be the minimum dollar value required to proceed to the next page of your cart. This solution is handy because a minimum value can be assigned to one type of checkout and not another. For example, you might only wish to have a minimum value on international orders. In the event a customer has not met the minimum value, NetMerchant responds with, "Your subtotal must be at least $XX in order to continue with the checkout process." where XX is the value you set.

Quantity Price Breaks

In order to use Quantity Price Breaks, you MUST be using SQL for your products. There are three steps to the process:
  1. Create a new Price breaks table with columns for:
    • item number (column must be named exactly the same as the item number column in the products table) - This is used to match the item ordered with the right price break entry
    • item per unit price (column must be named exactly the same as the price column in the products table) - This is the price that should be used at this break qty level
    • break level - This is used to set the floor for a break level... it's the minimum qty at which this price is valid
  2. Populate breaks table with the data you want. If an item exists in the main products table, but not in the breaks table (at the qty ordered OR at all), the price from the product table will be used. Here is an example of data for item 1234, which costs 1.99, but is discounted to 1.89 if 10 or more are ordered, and 1.49 if 100 or more are ordered:
    item num break qty price
    1234 10 1.89
    1234 100 1.49
  3. Alter inventory.conf in the cart directory...add the following two values:
    • pricebreak_tableprice_breaks_table_name_here
    • pricebreak_qty_columnname_of_qty_column
Now that you're done, NetMerchant will simply display the quantity discounted price for the visitor in the cart. For example, if one ordered 112 of item 1234 above, you'd see in the cart:

qty item num description item price item total
112 1234 Some item desc $1.49 $166.88

ICG Link, Inc. 7003 Chadwick Drive, Suite 111, Brentwood, TN 37027