Previous | Next Main Index:   Frames | No Frames
Document:   Frames | No Frames
 

WebStore Product Database

 
WebStore's product database is /Web_store/Databases/outlet.data.
 
For WebStore, the database filename is defined in $data_file in outlet.setup.
For WS Editor, the database filename is defined in $data_file in outlet_editor.setup.
 
 
General Information
Database Fields
Converting tab-delimited Excel © Spreadsheets
Conversion Options
Backup Filename Conventions
 
 

 
 
General Information
 
 
Fields in outlet.data
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color | Size | Shipping | Item | Category | Price | Name | Description| Image | Id 
 
 
 
Index
 
Database Fields
 
 
 
 Color and Size
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color | Size | Shipping | Item | Category | Price | Name | Description| Image | Id 
 
 
Color and Size Fields are required.
 
The Color field must be Field 0 (zero) for each item in the database.
The Size field must be Field 1 (one) for each item in the database.
 
Item's requiring Color drop down element:
Include the list number from %DD1_FIELDS in the item's Color field in the store's database. The list number corresponds to the item's list of colors required to construct the drop down element.
 
Item's requiring Size drop down element:
Include the list number from %DD2_FIELDS in the item's Size field in the store's database. The list number corresponds to the item's list of sizes required to construct the drop down element.
 
Item's not requiring Color or Size drop down element:
If an item does not require the use of a color or size drop down list element, put nothing in the item's Color or Size field in the store's database
 
 
Color and Size examples used in item database, outlet.data:
0|0|Item|Category|Price|Name|Description|Image|Id
First Color list in %DD1_FIELDS - First Size list in %DD2_FIELDS

6|3|Item|Category|Price|Name|Description|Image|Id
Last Color list in %DD1_FIELDS - Last Size list in %DD2_FIELDS

|3|Item|Category|Price|Name|Description|Image|Id
No Color list - Last Size list in %DD2_FIELDS

6||Item|Category|Price|Name|Description|Image|Id
Last Color list in %DD1_FIELDS - No Size list

||Item|Category|Price|Name|Description|Image|Id
No Color list - No Size list
 
 
Index
 
For reference within this document, %DD1_FIELDS and %DD2_FIELDS from the store's setup file, outlet.setup, have been duplicated below.
 
%DD1_FIELDS = (

  '0'   =>  [ 'Blue',        'Black',        'Navy',        'Red' ],
  '1'   =>  [ 'Light Blue',  'Light Brown',  'Red',         'White' ],
  '2'   =>  [ 'Blue/Black',  'Green/Black',  'Pink/Black',  'Red/Black' ],
  '3'   =>  [ 'Cadetblue',   'Coral',        'Cornsilk',    'Crimson' ],
  '4'   =>  [ 'Dark Blue',   'Dark Cyan',    'Dark Gray',   'Dark Green' ],
  '5'   =>  [ 'Brown',       'Gray',         'Green',       'White' ],
  '6'   =>  [ 'Gold',        'Goldenrod',    'Gray',        'Green' ]

); # DO NOT REMOVE - terminates %DD1_FIELDS.
%DD1_FIELDS is a hash of arrays listing your color selections.
 
Each item that requires color definition using a <FORM> drop down list element will access one of the color lists in %DD1_FIELDS according to the value (0 - 6) stored in the item's Color field in the store's database.
 
This arrangement offers unlimited color sets for drop down list elements while keeping repetitive data to a minimum in the store's database.
 
NOTE: First element of an array is 0 (zero).
 
 
Fields
 
%DD2_FIELDS = (

  '0'  =>  [ '15 x 32',      '15 x 34',      '15 x 36',      '15 x 38',
             '15 1/2 x 32',  '15 1/2 x 34',  '15 1/2 x 36',  '15 1/2 x 38',
             '16 x 32',      '16 x 34',      '16 x 36',      '16 x 38',
             '16 1/2 x 32',  '16 1/2 x 34',  '16 1/2 x 36',  '16 1/2 x 38',
             '17 x 32',      '17 x 34',      '17 x 36',      '17 x 38',
             '17 1/2 x 32',  '17 1/2 x 34',  '17 1/2 x 36',  '17 1/2 x 38',
             '18 x 32',      '18 x 34',      '18 x 36',      '18 x 38',
             '18 1/2 x 32',  '18 1/2 x 34',  '18 1/2 x 36',  '18 1/2 x 38',
             '19 x 32',      '19 x 34',      '19 x 36',      '19 x 38' ],

  '1  =>'  [ 'Small',    'Medium',  'Large',       'X-Large',      'XX-Large' ],
  '2  =>'  [ 'Small',    'Medium',  'Large',       'X-Large',      'XX-Large',  'XXX-Large' ],
  '3  =>'  [ 'Regular',  'Tall',    'Extra-Tall',  'Big Regular',  'Big Tall' ]

); # DO NOT REMOVE - terminates %DD2_FIELDS.
%DD2_FIELDS is a hash of arrays listing your size selections.
 
Each item that requires size definition using a <FORM> drop down list element will access one of the size lists in %DD2_FIELDS according to the value (0 - 3) stored in the item's Size field in the store's database.
 
This arrangement offers unlimited size sets for drop down list elements while keeping repetitive data to a minimum in the store's database.
 
NOTE: First element of an array is 0 (zero).
 
 
Fields
 
 
Shipping
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color | Size | Shipping | Item | Category | Price | Name | Description| Image | Id 
 
 
Shipping Field is required for Database Item Shipping Prices and Database Item Shipping Weights only.
 
If you do not use either of these shipping methods, the Shipping field is optional.
 
 
Fields
 
 
Item
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color | Size | Shipping | Item | Category | Price | Name | Description| Image | Id 
 
 
Item Field is optional.
 
The Item field contains each item's inventory number.
 
No HTML code is included in this field as it is written to the order e-mail messages.
 
 
Fields
 
 
Category
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color | Size | Shipping | Item | Category | Price | Name | Description| Image | Id 
 
 
Category Field is required.
 
The Category field must exist in each item's database row.
 
A Category consists of a group of similar products in the store's database.
 
Category names consist of a word or short phrase describing the products placed in the category.
 
Category names must be alpha or alpha-numeric and must contain at least one alpha character [A-Z a-z 0-9].
 
All items having the same Category name are printed to the client's web browser in one HTML table.
 
 
Fields
 
 
Price
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color | Size | Shipping | Item | Category | Price | Name | Description| Image | Id 
 
 
Price Field is required.
 
The Price field must exist in each item's database row.
 
The Price field is a fixed point, decimal number.
 
Do not add currency markers (dollar sign, etc.), commas, alpha characters, or whitespace (spaces or tabs) in the Price field.
 
 
Fields
 
 
Name
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color | Size | Shipping | Item | Category | Price | Name | Description| Image | Id 
 
 
Name Field is required.
 
The Name field must exist in each item's database row. The field contains the name of the item.
 
The Name field is used in View/Modify, Order Form, and Confirmation of Order tables.
 
No HTML code is included in this field as it is also written to the order e-mail messages.
 
 
Fields
 
 
Description
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color| Size | Shipping | Item | Category | Price | Name | Description | Image | Id 
 
 
Description Field is required.
 
The Description field must exist in each item's database row.
 
The field contains descriptive information about the item.
 
The Description field is used in Category tables.
 
HTML code may be included in this field.
 
 
Fields
 
 
Image
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color | Size | Shipping | Item | Category | Price | Name | Description| Image | Id 
 
 
Image Field is required.
 
The Image field must exist in each item's database row.
 
If an item does not have an image to display, put nothing in the Image field.
 
Image Alignment to Text
You can control how each item's image displays in relationship to the text fields displayed in database Category displays and search result displays by preceding the image field with:
R~~   Image right of text
T~~   Image centered above text
TL~~  Image aligned left, above text
TR~~  Image aligned right, above text
X~~   Image defaults to left of text when
       X is not equal to R, T, TL, or TR

Image left of text - Nothing before Image
~~ is two tildes
If a database field number is defined in $item_fld_num in outlet.setup, and WebStore is constructing image filenames based on the contents of the Item field, alignment attributes may be stored in the Image field to align these images. <IMG SRC> tags are not required in the Image field. Images will align left if no alignment attribute is placed in the Image field. Refer to $item_fld_num for further details.
 
The image stored in the Image field will be displayed in database Category displays and search result displays.
 
Do not define the Image field in Category or View/Modify table variables in the store's setup file, outlet.setup as WebStore controls printing the <img src="Image"> to the client's web browser.
 
Include the entire <img src> tag in the Image field.
 
The <img src> tag may be wrapped inside an <a href> tag including one of two WebStore query strings to link to expanded item information pages.
 
The image's relative or absolute address must be wrapped in " (double quotes).
 
Image Field Examples:  Relative Addressing
Image right of text:
|R~~<img src="Graphics/Pique.gif" alt="Image" width=120 height=152>|

Image centered above text:
|T~~<img src="Graphics/Pique.gif" alt="Image" width=120 height=152>|

Image aligned left, above text:
|TL~~<img src="Graphics/Pique.gif" alt="Image" width=120 height=152>|

Image aligned right, above text:
|TR~~<img src="Graphics/Pique.gif" alt="Image" width=120 height=152>|

Image left of text:
|X~~<img src="Graphics/Pique.gif" alt="Image" width=120 height=152>|

Image left of text:
|<img src="Graphics/Pique.gif" alt="Image" width=120 height=152>|

No Image displayed:
||
Image Field Examples:  Absolute Addressing
|<img src="http://www.YourDomain.xxx/Web_store/Graphics/Pique.gif" alt="Image" width=120 height=152>|

Additional Image Attributes and Syntax:
|<img src="Graphics/Pique.gif" lowsrc="Graphics/Low.gif" clear=left align=left hspace=10 vspace=10 border=2 units=pixels width=120 height=152>|   

<img src> wrapped inside href anchor, aligned right of text:
|R~~<a href="URL"><img src="Image"></a>|
A variety of ornamental borders may be configured for images stored in the Image field using $img_border, $img_padding, $outer_img_clr, and $inner_img_clr in the store's setup file, outlet.setup.
 
 
Fields
 
 
Id
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color | Size | Shipping | Item | Category | Price | Name | Description| Image | Id 
 
 
Id Field is required.
 
The Id field must exist in each item's database row.
 
The last field of each item's row must be the Id field which is the item's identification number.
 
Item Id values are numeric only. Item Id's must be unique and can not be duplicated within the database.
 
When an Id number is detected containing alpha or special characters, WebStore checks the entire database for invalid characters in Id fields and returns an Alpha Characters in Database Id Number error message listing all detected invalid Ids.
 
When a duplicated Id number is detected during an Add to Cart script process, WebStore checks the entire database for duplicated Id numbers and returns a Duplicate Database Id Number error message listing all detected duplications.
 
 
Fields
 
 
Converting tab-delimited Excel © Spreadsheets
 
 
WS Editor will convert tab-delimited spreadsheets, with or without " (double-quote) text quantifiers, to WebStore's | (pipe) delimited format.
 
WS Editor's internally defined file extension for tab-delimited spreadsheets is .txt. The spreadsheet's filename is constucted by appending .txt to the database filename defined in $data_file in outlet_editor.setup:
outlet.data.txt
 
Upload outlet.data.txt to the /Databases sub-directory as an ASCII text file.
 
Line termination characters will be corrected at the time of conversion if you upload this file in BINARY mode. Records merged into the existing database are corrected. The contents of the original spreadsheet are never altered.
 
WS Editor checks for the presence of the database's spreadsheet, outlet.data.txt, on each script process. When a spreadsheet is detected with a byte count greater than zero, WS Editor immediately switches to it's spreadsheet conversion page and remains locked on this page until a conversion option is submitted, converting or deleting the spreadsheet from the /Databases sub-directory.
 
Spreadsheets with a byte count equal to zero are ignored by WS Editor.
 
 
Index
 
 
Spreadsheet Conversion Options:
 
The following options are listed on WS Editor's spreadsheet conversion page:
 
  Merge records in outlet.data and outlet.data.txt  
 Group/AddMaintain existing Item Id's in outlet.data
 Group/Remove  Maintain existing Item Id's in outlet.data
 Sort/AddAssign sequential Item Id's in outlet.data
 Sort/RemoveAssign sequential Item Id's in outlet.data
  Replace records in outlet.data with outlet.data.txt  
 
 Sort/AddAssign sequential Item Id's in outlet.data
 Sort/Remove  Assign sequential Item Id's in outlet.data
  File Options  
   Backup original outlet.data and outlet.data.txt
Example backup filename:  outlet.19990907.093025AM.data
Delete outlet.data.txt - Do not merge or replace files
No backup files created
Id numbers present in the spreadsheet are always discarded.
 
Group/Add and Group/Remove functions maintain the existing database id numbers present in outlet.data, sorts the records according to the ascending/descending selections for the primary and secondary sort fields, and assigns id numbers to merged records from the spreadsheet beginning with the largest id number found in outlet.data, plus 1.
 
Sort/Add and Sort/Remove functions remove the existing database id numbers present in outlet.data, sorts the records according to the ascending/descending selections for the primary and secondary sort fields, and assigns sequential id numbers, beginning with 1.
 
Group/Add and Sort/Add functions add  COMMENT:  Category Name  category headers for each category present in the database. Double spacing is added between each category grouping in the database.
 
Group/Remove and Sort/Remove functions remove all  COMMENT:  Category Name  category headers detected in the database. Double spacing is removed from the database.
 
 
Index
 
 
Backup Filename Conventions:
 
The backup filenames for the original database and spreadsheet are constructed by inserting the date and time of conversion into each filename using the following format:
outlet.19990907.093025AM.data
outlet.19990907.093025AM.data.txt

1999 - Year     09 - Hour
  09 - Month    30 - Minutes
  07 - Day      25 - Seconds
                AM - AM/PM
 
 
Index | Top of Page