"Web hosting solutions for Australia"

Web design Web hosting Ecommerce FAQs

Home

About us

Domain names

Support

Online quote

Email us...

*This website uses 'Fly-out Help' (more info)

Database Driven Ecommerce

This page describes the product database for the OzeWebHost shopping cart and secure ecommerce system. This is an alternative method to hard coding forms in a website. This facility allows:

  • easy update of a fast changing product catalogue,
  • stock control, preventing sale of more stock than the merchant can supply.

To add a product to the database, the merchant needs to:

  1. FTP (file transfer) any product images to your website. There can be two images per product (small and large). The images are optional, however you cannot display the large image if there is no small image on which to click. Two images for each product can be transferred:
    • An image that fits into a 100x100 pixel box. This image goes into /www/images
    • An image that fits into a 400x400 pixel box. This image goes into /www/largeimages
    Both the small and large image for a product must have the same name, eg koala1.jpg
  2. Go to teddyshop.com.au/serversecure/getproducts.php and enter the product information. You will need your domain's userid and password. When you click the update button the product is updated, the images are checked and their dimensions are entered in the database. If you subsequently update the product images, you must go to this url, select the product, and click the update button to recheck the image dimensions.

Entering Product Information in the Database

The merchant can add, change and delete products. Go to teddyshop.com.au/serversecure/getproducts.php and enter the following product information

Product Group (a label by which to group products in the web site):
A web page will display a whole group of products (see the next section).
    koala
Product Name (include any product code):
    T01 Cuddly Koala
Product Cost: (do not include the $):
    25.30
Quantity in stock (leave blank if not applicable):
    12
Product description (may include html form elements):
This example allows the selection of colour.
    The Cuddly Koala is a favourite with small children<br>
    <select name="Colour">
      <option value="grey">
      <option value="brown">
    </select>
Any special attributes (eg good condition), each on a separate line:
These are spaced out, horizontally, under the description on the web page.
    20 cm tall
    synthetic fur
Weight to be used to calculate delivery and handling:
    0.09
Whether the product is packed and posted separately from the rest of the order:
    No
Unit of measure for quantity (eg Kg or empty for just items):

Product image file name (will check for images in the server and calculate their dimensions):
    koala1.jpg

Inserting Products in a Web Page

On the merchant's web site, a group of products can be inserted into a web page by using the HTML servlet tag.

<html>
  <head>
    <title>The Teddy Shop - Koalas</title>
  <script language="JavaScript">
    function showWin()
      {
      window.name='origin';
      var w = window.open('','order',
          'width=500, height=400,resizable,scrollbars');
      w.document.clear();
      w.focus();
      return true;
      }
    function popWin(pic)
      {
      var w = window.open('', 'popit', 'width=420,height=500');
      var d = w.document;
      d.write('<html><head><title>Teddy Picture</title></head><body bgcolor="white" leftmargin="6" topmargin="6">');
      d.write('<center><table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center">');
      d.write('<img src="largeimages/' + pic + '">');
      d.write('</td></tr><tr><td align="center"><form>');
      d.write('<input type="button" value="Close this window" onClick="window.close();">');
      d.write('</form></td></tr></table></center></body></html>');
      d.close();
      w.focus();
      return false;
      }
  </script>
  </head>
  <body>
  <h1>The Teddy Shop</hi>
  <p>Here is a list of Koalas</p>
  <servlet code="EcoListGroup">
    <param name="client" value="teddyshop">
    <param name="group" value="koala">
    <param name="quantity" value="yes">
  </servlet>
  </body>
</html>

"EcoListGroup" is the program on the server that lists the products from the database together with the order buttons. The merchant id is "teddyshop". This id is defined by OzeWebHost staff. All products will be listed that have a group value of "koala". All values are case sensitive. In this example quantity is set to "yes" meaning the customer can type the quantity of a particular product they wish to order.

Currently EcoListGroup produces a list of html tables that are 640 pixels wide. Other layouts may be developed on request.

The javascript function, showWin, produces the pop up order window. The javascript function, popWin, produces the pop up window containing an enlarged image. This function is called from a link on the small image of a product. "largeimages/" may need to be changed if the large images are placed elsewhere.

Try an example

There is an example you can play with - www.ozewebhost.com/eco/index.html

"Check out what our customers are saying about our service!"
 

Ozewebhost Pty Ltd

Park Road, Nowra, NSW 2541 Australia
Telephone: +61 (0)2 4423 0644
Email: info@ozewebhost.com

 

If you hold you mouse cursor over a (more info) text link on this site, a small flyout screen will appear containing additional information. This screen will disappear as soon as you move your cursor away from the (more info) text link. We hope this makes it easier for visitors to navigate our website and gain the information they are seeking.
John Crago, CEO

Here is the 2nd flyout.

Here is the 3rd flyout.