|
JShop Instructions
DISCLAIMER. This software is provided as-is and as such Whorl can not be
held responsible for loss of business or information through its use. Every
effort has been made to verify its fitness for purpose.
Contents
What is JShop?
With JShop customers can also review their shopping basket at any time,
removing items or starting completely afresh again.
JShop is client-side, written in JavaScript, meaning that there's no hard
churning work for your server and things run much faster. It also makes use
of cookies, so there's no external files to worry about either.
Is JShop free to use?
How do I set up JShop?
index.html - sets up the two frames needed for the shopping basket
The index file sets up two frames, the bottom one called 'menu' (which should
be left as menu in order for the JavaScript routines to work) and a top one
called 'main'. At the moment index.html is set up to load bmenu.html into the
bottom frame (which should not be changed) and bitem.html into the top frame
(this can be changed if you wish).
bitem.html calls routines for adding items to the shopping basket from
bmenu.html. What ever way you set up your items on these pages the function
you need to call in order to add items to the shopping basket is buyItem().
It can either be used as a link:
<A HREF="javascript:top.menu.buyItem(product,price,quantity)">Buy</A>
or as an onClick statement on a form button:
<INPUT TYPE=BUTTON onClick="javascript:top.menu.buyItem(prod,price,quant)">
You'll notice in the code that quantities are picked up from a form box. For instance, the quantity box for the first item is called cbtquant. So all you have to do is pick up the value in that box when you call buyItem().
top.menu.buyItem('Chemical Brothers T-Shirt','15.95', document.itemsform.cbtquant.value)
Finally, in bbuy.html and bfinish.html you'll have to amend the FORM tag in order to point to your correct form mailing script. Contact your web space provider for more details if you're not sure or contact us and we'll try and help you out.
And that's really all there is to it. There is some commenting in the code to
help you understand what's happening.
Can I get help from Whorl?
Written by Gareth Lancaster (6th June 1997)
|
JShop and this site are © 1997, Whorl