Add to Cart

Add to Cart

The second method of interfacing to your existing web site is slightly more complex. A specific hyperlink is added anywhere in your existing web site to routine shopaddtocart.asp . This will allow adding one specific product to the cart from anywhere in the existing web. Two parameters are required: catalogid and Quantity as shown below. The catalogid comes from the products database (catalogid field).

<a href="shopaddtocart.asp?catalogid=1&quantity=1">Click to Order</a>

You can also pass the features to the cart by:

  • &feature1=5 - (where 5 = the feature number you wish to add)

So the new link would look like:

The second method of interfacing to your existing web site is slightly more complex. A specific hyperlink is added anywhere in your existing web site to routine shopaddtocart.asp . This will allow adding one specific product to the cart from anywhere in the existing web. Two parameters are required: catalogid and Quantity as shown below. The catalogid comes from the products database (catalogid field).

<a href="shopaddtocart.asp?catalogid=1&quantity=1">Click to Order</a>

You can also pass the features to the cart by:

  • &feature1=5 - (where 5 = the feature number you wish to add)

So the new link would look like:

<a href="shopaddtocart.asp?catalogid=1&quantity=1&feature1=5">Click to Order</a>

Note that in previous versions of VP-ASP, the field “productid” was used. This still works successfully.

Another handy option you may want to use is the shopend.asp page. This will enable you to add a link from your existing site to empty the cart.
A typical link using this file would be 

Empty Cart

 

 

Adding Multiple Products In A Single Link

To add multiple products to the cart in a single link you will need to use the shopproductselect.asp file rather than shopaddtocart.asp.

You will need to formulate a link such as:

http://localhost/VPASP/v6.504/shopproductselect.asp?prodindex=3&processed0=10&processed1=11&processed2=12&quantity=1,2,3

where:

prodindex - is set to the number of different line items you are adding
processed(x) - is the product id of the item you are adding. x starts at zero and increases by 1 for each line item.
quantity - is a comma separated list of values for each of the line items. the first corresponds to the quantity for processed0, the second value corresponds to the quantity for processed1 and so on.

a href="shopaddtocart.asp?catalogid=1&quantity=1&feature1=5">Click to Order<

Note that in previous versions of VP-ASP, the field “productid” was used. This still works successfully.

Another handy option you may want to use is the shopend.asp page. This will enable you to add a link from your existing site to empty the cart.
A typical link using this file would be 

Empty Cart

 

 

Adding Multiple Products In A Single Link

To add multiple products to the cart in a single link you will need to use the shopproductselect.asp file rather than shopaddtocart.asp.

You will need to formulate a link such as:

http://localhost/VPASP/v6.504/shopproductselect.asp?prodindex=3&processed0=10&processed1=11&processed2=12&quantity=1,2,3

where:

prodindex - is set to the number of different line items you are adding
processed(x) - is the product id of the item you are adding. x starts at zero and increases by 1 for each line item.
quantity - is a comma separated list of values for each of the line items. the first corresponds to the quantity for processed0, the second value corresponds to the quantity for processed1 and so on.


Times Viewed:
21369
Added By:
Steve Baldwin
Date Created:
10/6/2005
Last Updated:
11/18/2014