Vintners.net: Shopping Cart use
I have written a custom shopping cart application especially for wineries. It is intended to be generic enough to suit all the wine shipping needs of any winery, but specific enough to do an excellent job of getting winery shipping info.
The key to the cart is the
order.cfg file in your
account on the Vintners.Net webserver. This file will be on your
account when it is set up for you. It is up to you to put in correct
values for your business, eg. your tax rate. You will need to
download it, modify, and replace it. This file is "yours" -- it's up
to you to maintain it. There are comments explaining each item in the
It's a bit tricky to set up, but not hard. In your HTML, for each item you wish to be purchasable, you add a POST action <FORM ...> directive with a bunch of hidden fields.Here's a sample:
<form method="POST" ACTION="http://secure.vintners.net/cgi-bin/order/order.pl"> <input type="hidden" name="Cmd" value="Product"> <input type="hidden" name="Product" value="1997 Reserve Chardonnay@$12.99"> <table border=0> <tr> <td>Buy <input name="Quantity" size="3" maxlength="3"> bottles</td> <td><input type="submit" name="Add" value="Add to cart"></td> <td><input type="submit" name="EditCart" value="Review cart"></td> </tr> </table> </form>And here's what it actually looks like (expect an error if you hit one of these buttons, this is fake):
To handle case discounts, merely insert the case price after a pair of asterisks, between the name and the at sign. You can include the word "case" for clarity, then a dollar sign, and the case price in dollars and cents. For example:
<input type="hidden" name="Product" value="1995 Merlot**case $179.95@$18.95">
Several of the above on a page will give you a quantity box and buttons for each item. This works well on a wordy page with wine descriptions next to each item.
Alternatively, you can have many of these lines within a single FORM directive. Sample: St. Innocent Winery and click on "How to Order". For this setup, the "Cmd" line is changed to:
<input type="hidden" name="Cmd" value="form">and the "Product" lines are:
<input name="NV Starboard@$30.00" size=3 maxlength=3>You have multiple Name lines -- they can contain case discounts as do Product lines.
<input type="submit" name="Form" value=" Add to Cart ">The value can be changed, but not the type or name. (The value is the part that is displayed on the webpage.)
<input name="2010 Merlot**case 240.00" size=3 maxlength=3>
I'd highly recommend you visit the sample pages mentioned in the Variations section, and hit the "view", "page source" buttons in your browser. You will be able to see exactly how their shopping pages are implemented.
As this is not a parsed script, you do not need to name your file .shtml.
You won't be able to test this on your local machine as your web browser won't know how to run the script (it runs on the Vintners.Net server). When testing, simply go through the process using your real email address, but for the USPS address, enter "just testing, please ignore" or some such. Use the number "1111-1111-1111-1111" as the visa card number and we'll recognize this is a test request and ignore it.
Note sample above, case discounts are handled by inserting two asterisks after the wine description, followed by the case price including dollar sign. It is optional to follow up with an at-sign then a bottle price. If a case price is included, but no bottle price, it is assumed only full cases can be purchased. There's one little tricky exception to this -- if you wish to allow half case purchases, follow the two asterisks with a caret. Sorry for the silly magic syntax, but that's the way it is.
To include non-bottle items, simply insert an exclamation point between the at-sign and the price. eg.:
<input type="hidden" name="Product" value="T-shirt@!$18.95">
Don't hesitate to email/call if you have problems with it. Contact us.
Page last updated: 12-Dec-2001