Handbook Part 8
Part One | Part Two | Part Three | Part Four | Part Five | Part Six | Part Seven | Part Eight
- TEMPLATE HTML
You may rename template.html file, to template.php, template.asp etc. etc. as extension name.
The template.html file, is a normal HTML file and serves as a display "wrapper" for the content displayed by the cart. template.html must be in the cgi-bin location. CHMOD 644.
Wherever you want the script information to appear on your pages you must insert the following tag:
[main content] The tag is case sensitive and include the brackets [ left and right ]. The tag is very important.
In the cgi-bin you will see these files:
1. admin.cgi
2. cart.cgi
3. review.cgi
4. coupon.cgi (optional)
5. path.cgi (tool)
6. cartconfig.pl
7. authorize.pl
8. template.html (no need to use the file within Sandvox and RapidWeaver)
Note that you will need to use full URLs or URLs relative to the root directory on all of your links, images, and style sheets so that the template will work from any folder on your site.
If you are going to use a secure server any images or linked style sheets need to use full secure URLs.
The example template.html file included with the ZIP contains an example stylesheet embedded into it, between <head> and </head>. The program only makes use of one stylesheet class for the tables that display the small images of the products. The rest are only definitions of basic HTML tags.
Note that all of the tags defined in the example stylesheet are used in the program.
The template.html is a strong point of Datalogica CGI Shopping Cart system, because in this file the entire layout of your website is placed.
You can even create a website using iWeb (Apple - discontinued), Frontpage (Microsoft - discontinued), Sandvox (Karelia), Dreamweaver (Adobe), Fusion (Netobjects), RapidWeaver (Realmac Software), WebPlus X4 (Serif) and of course many more WYSIWYG programs.
Then it's just a matter of copying the index.html code and pasting it into your template.html file, and you have instantly an online web store with its own layout. Put on the correct spot [main content] and you're done!
- LAYOUT
This part is also well explained on the FAQ page.
The HTML output of the script is very basic HTML code that should be easily interpreted by most browsers, but there are a few things to keep in mind and you should know.
First, the script pulls in the HTML code that you define with your template.html file for the look and feel of your shopping cart. If your template.html file is not compatible with multiple browsers, then the script won't be either. Old browsers, such as Netscape can be particularly frustrating because if it doesn't like your code, sometimes it won't display anything at all.
Note! Keep also in mind that if you are using SSL to secure checkout, your template page has to work using that URL as well as a non-secure URL. Definitely check the template.html for browser compatibility through a secure URL before you put the shopping cart into production.
If you are using Authorize.net you MUST use full secure URLs for all the images and links on your template page or it won't work correctly in any browser!
Style Sheets can present big browser compatibility problems too and must be checked on multiple browsers. If you are linking your style sheet to your template.html file, make sure the URL works on a secure server if you need it to do so.
Second, if you are linking to categories from static HTML pages you must use a + instead of a space in the URL. This only matters in categories that have more than one word, of course. IE and other browsers doesn't really care, but Netscape will choke if there is a space in the URL.
- APPLICATIONS
Using an HTML editor to make certain web pages is a great solution if you want to develop a website.
To add product pages within Datalogica CGI Shopping Cart, you don't need any HTML editor or specific knowledge. Datalogica's Shopping Cart provides an excellent HTML output, once you have added a product, and then click on Export to HTML, you have a perfectly generated HTML page in correct HTML code.
This is a very strong point of Datalogica CGI Shopping Cart system, in cooperation with the inventory.html, which is also automatically created.
The .pl and .cgi scripts are in UNIX text format. If you open it with an editor such as Windows Notepad, you see strange characters. These are 'newline' characters of UNIX. You will need a good HTML editor - UltaEdit for Windows PC or TextMate for Apple computers - that can translates UNIX characters. Windows WordPad will also work properly. For Apple, use TextEdit.
WYSIWYG - What You See Is What You Get - Some HTML editors
• Dreamweaver from Adobe (Windows & Apple)
• Sandvox from Karelia (Apple)
• RapidWeaver from Realmac Software (Apple)
• WebPlus from Serif (Windows)
• Fusion from NetObjects (Windows)
Etc. etc.
- FEEDBACK
Hi, my name is Rafael R. Dahan, Perl/CGI Programmer of Datalogica.
I hope that you enjoyed reading Datalogica's online Handbook. I value your feedback and would like to know your thought on the handbook. There is no change to win a six-bottle case of champagne! But your input is welcome and your support is highly valued and greatly appreciated
I thrive on the challenge of making your online experience a positive one. I am very interested to hear your views about my website and your experience of learning with me. If you would like to contact me direct about any aspect of my work please email me at the email address below.
Your comments will be used to improve the way I'll serve you and all others in the year ahead.
Thank you!
Rafael R. Dahan
Email Me
Your feedback will be treated as confidential and will not be passed on to anyone.
Shopping Cart »