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

WS Editor Online Database Editor

 
General Information
Accessing WS Editor
Configure Setup File Filenames
Converting tab-delimited Excel © Spreadsheets
Conversion Options
Backup Filename Conventions
 
 

 
 
General Information
 
 
 
 
Index
 
 
Accessing WS Editor
 
 
http://www.YourDomain.xxx/AnyDirectories/ws_editor.cgi
WS Editor will require the setup file defined in $default_setup_file, located in the DEFINE VARIABLES section at the top of ws_editor.cgi:
$default_setup_file = 'outlet_editor.setup';
WS Editor adds .setup to the filename listed in $default_setup_file and the filename defined in setup= in query strings if the filename does not end in .setup.
 
Online Demo:   No Query String
Requires outlet_editor.setup, defined in $default_setup_file.
 
Online Demo:   ?setup=Resellers.data~Name_editor
Requires Resellers.data~Name_editor.setup.
 
 
Index
 
 
Configure Setup File Filenames
 
 
WS Editor will print a drop down select element listing setup files ending in _editor.setup. A minimum of two setup files is required.
 
Filenames may be configured to display database filenames or a phrase in the drop down select element.
 
When WS Editor detects more than one . (dot), _ (underscore), or a ~ (tilde) in the filename, _editor.setup is removed from the filename and the remaining portion of the filename is translated for display using the following character substitutions:
_ (underscore)  converted to  single space
~ (tilde)       converted to  " sort by "
Drop down select for filenames below:  
outlet_editor.setup
Resellers.data.txt_editor.setup
Resellers.data~E-mail_Address_editor.setup
Resellers.data~Name_editor.setup
Resellers.data~Reseller_Code_editor.setup
 
Multiple WS Editor setup files may be configured for the reseller's database, Resellers.data, with a different primary sort field defined in $category_fld_num of each setup file, associating each file's filename with the name of the primary sort field defined in the file.
 
NOTE:
$category_fld_num in outlet_editor.setup must match $category_fld_num in outlet.setup. WebStore's product database must always be sorted by the field defined in $category_fld_num in outlet.setup.
 
 
Index
 
 
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