FNS includes programs which allow complete web-based site administration. Products can be added, changed and deleted from the Web via links under the products section of the administration page. FNS also allows automatic web-page generation for products in the products database table. Access to customer data is provided, and the administrator can view, update, delete or select (by name) customer information over the Web. Likewise, the ability to view order data and update it is provided, plus sales reporting by product type and date ranges. Importing and exporting data in ASCII-delimited text is also offered.
Administrative CGI programs include executables for adding, updating and deleting data from Customer, Order and Product database tables. Most of the programs are self-explanatory, but several will be discussed below where there is a particular item of importance.
addprod.cgi adds product data to the Products tables. The data is entered into an HTML form page. The form includes data fields for a user-entered unique product identification number (prodno) plus description, name and price. Availability in days or weeks plus quantity on hand are available. A field to enter search keywords is also provided. Keywords should be entered with a space between each one; it is not recommended that special characters such as quotes or apostrophes be used. The keywords entered here are used by search.cgi to determine a match. A field for entering the URL of an image is given. The image referenced by this URL will be added to the product HTML page when generated by FNS's genppage.cgi program. The default location for images is in the /images directory. Entries should follow the format:
where prodimage.jpg is the image file name. The actual image can be transferred with FTP to the images directory before or after the product is added. Multiple products can also share the same image. Once the data is entered, addprod.cgi will insert the information into the Product table.
genppage.cgi generates product pages automatically in HTML format. genppage.cgi reads in the header.htm and footer.htm files and writes them to an HTML file after being combined with product data from the Products tables. genppage.cgi names the output files after the product number and creates the pages in the “products” directory. Thus, genpage.cgi creates the file products/1000.htm for product number 1000. When a product is updated and the header.htm or footer.htm files are changed, the site administrator can update the product HTML page by re-running genppage.cgi for that particular product or for all products by specifying the range (by product number). The search.cgi program provides a link to the product page for each product returned from a search.
upord.cgi can be used to update basic order information. If lineitem-level changes are required, the order can be zeroed out or voided and re-entered as a new order. When all product for an order ships, the actual shipping date can then be entered into the “Completion Ship Date” field for future reference.
export.cgi allows the administrator to export the contents of the FNS tables to text files. Running export.cgi will create the following files: dataprod.csv, datacust.csv, dataord.csv, dataline.csv, datacart.csv, datapack.csv and datahold.csv. The names of the files correspond to the contents; for instance, dataprod.csv contains all data from the Products tables. The files are created in the admin directory. Files are written in ASCII comma-separated value format with text delimited by quotation marks (sometimes referred to as ASCII-delimited text). Exported data files can be imported into spreadsheets or other databases that recognize this format.
Work on import.cgi is in progress. When completed, import.cgi will read data files exported by export.cgi into database tables. If one desires to import particular tables, for example Products, the other data files can be renamed, moved or deleted from the /admin directory. If import.cgi is used to insert data files exported from spreadsheets in comma-separated value format, it is important to ensure field lengths do not exceed the lengths allowed in FNS tables (see the createtables file for table definitions), or the data values will be truncated. For instance, the customer name field (name) shows a data type of char(50). This means up to 50 characters are allowed in this field. However, the actual usable number of characters that can be entered is 48, since the delimiters must be accounted for in the total. It is also important to verify that all text fields are enclosed by quotation marks, and the field sequence fits the field order as defined in FNS. Most spreadsheets will automatically enclose text cells with quotes when exported in CSV format.
In addition to these web-based utilities, mSQL comes with several command-line tools and a terminal monitor that allows maintenance of the database from a shell account. Detailed information on these can be found in the mSQL documentation.
All in all, FreeNetshop provides a fairly simple yet scalable and robust application on which to develop e-commerce sites.
Kevin Lyons (firstname.lastname@example.org) has been involved with UNIX since 1985. He has experience on SCO Xenix, NextStep, Solaris, Linux, FreeBSD and OpenBSD platforms.
|Bitcoin on Amazon! Sort of...||Sep 28, 2016|
|Free Today: September Issue of Linux Journal (Retail value: $5.99)||Sep 27, 2016|
|nginx||Sep 27, 2016|
|Epiq Solutions' Sidekiq M.2||Sep 26, 2016|
|Nativ Disc||Sep 23, 2016|
|Android Browser Security--What You Haven't Been Told||Sep 22, 2016|
- Free Today: September Issue of Linux Journal (Retail value: $5.99)
- Bitcoin on Amazon! Sort of...
- Android Browser Security--What You Haven't Been Told
- Epiq Solutions' Sidekiq M.2
- Identity: Our Last Stand
- Nativ Disc
- The Many Paths to a Solution
- Securing the Programmer
- Tech Tip: Really Simple HTTP Server with Python
Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.Get the Guide