InterCommerce SecureSystem

Examples
Adding Items to the Shopping Basket


Let's say you're selling Bar-b-que sauce. You want to put a link on your web page where a user can click and add an item into the shopping basket. Here's one example:
<A HREF="http://www.icorp.net/mpr/morder?add+c_sample+i_1000+u_1.95+q_1+n_Bob's_Bar-B-Que_Sauce+f_0">
Add Bob's Bar-B-Que Sauce to my shopping cart.
</A>
Note that the URL above is one long line with all the information on the product embedded on the command line.

Here's what the URL looks like on the user's page:

Add Bob's Bar-B-Que Sauce to my shopping cart.

Once a user clicks on the URL, the Virtual Ordering Engine takes over, adds the item to the basket, and then presents the user with a list of options. At any time, they can complete the order, or return to your site to browse/add more products.

Let's dissect this URL so you understand how it works.

The URL is in this format:

<A HREF="http://order.icorp.net/mpr/mo?function+c_VendorID+token+token...">
Clickable text message such as "Add xxxx to basket" or <IMG SRC="...">
</A>

The question mark "?" separates the URL from the command line arguments - it is specified only once, after the /mpr/mo reference. The plus character "+" is used to separate each command line argument. The first two arguments are required, the rest, called tokens are optional or required depending upon the function.

The <A HREF="http://order.icorp.net/mpr/mo will generally be the same for all pages and sites - this references the order engine on our network. What follows specifies the behavior when the user clicks:

function is replaced with the appropriate function, in this case "add" to add the item to the user's shopping basket.

c_VendorID specifies your unique Vendor ID, so the VOE knows which merchant it's dealing with.

token is a sequence of additional bits of information (we call them tokens) describing, in this case, the product that's being added to the user's shopping basket. Tokens are in the format of a single character, immediately followed by an underscore "_" immediately followed by the user data. The first character identifies the token (i=item number, u=unit cost, q=quantity, n=name, f=freight).

Let's examine the tokens used in the above reference:

+i_1000+u_1.95+q_1+n_Bob's_Bar-B-Que_Sauce+f_0

i_1000 - The unique product ID (item number). In our example, the merchant has assigned the ID of "1000" to indicate this type of Bar-B-Que sauce. This ID does not have to be all numbers, but there can be no spaces.

u_1.95 - The price of the product is $1.95/each.

q_1 - We're placing a quantity of one item in the shopping basket.

n_Bob's_Bar-B-Que_Sauce - The name of the product (that will appear on the order is "Bob's Bar-B-Que Sauce". NOTE that we replace spaces with underscore "_" characters. This is *required* because you cannot have spaces in a URL reference. The system automatically converts the underscores back to spaces later.

f_0 - There is no freight charge for this item. (In this case, maybe the merchant has figured the shipping into the product price, or he's using a flat shipping charge, or the freight is based on the total amount of the order).

Important NOTE!

Some characters are illegal for use in web URLs and others will cause problems when referencing the VOE. For example, do not use a space - instead use an underscore (_) and it will be converted to a space for display. The following characters will also cause problems and should NOT be used in a product description or other part of a URL: # (pound or number sign) | (vertical line or pipe) " (quote character) & (ampersand) + (plus sign - used to separate commands in URLs and should not be part of a product description)


Now let's say that Bob can sell his Bar-B-Que sauce in two forms: Glass Bottles or Unbreakable Plastic containers. He sells them both for the same price, but wants to give the user the choice of whether he wants glass or plastic.

The Engine supports a special token called "style" which allows you to append some descriptive information onto the item. This will appear as a second line in the product description on the invoice. So we take the same URL and add an additional token:

+s_Plastic

As in:

<A HREF="http://www.icorp.net/mpr/mo?add+c_sample+i_1000+u_1.95+q_1+n_Bob's_Bar-B-Que_Sauce+s_Plastic+f_0">
Add Bob's Bar-B-Que Sauce (in a plastic container) to my shopping cart.
</A>

Add Bob's Bar-B-Que Sauce (in a plastic container) to my shopping cart.

As you can see, this "style" option gives you a lot of flexibility. If you were selling something like T-shirts, where the size or color might not affect price, you could specify these attributes as style tokens in the URL, creating a different URL for each combination of products.

In the next section, we'll list some examples where you can use FORMs to add items to a shopping basket - in this manner you can have a single URL (a form button) add multiple products, or let the user select the style from a pull-down menu.

Next Section: Adding items from a FORM