|
StaticStore » StaticStore Manual » How to run a static or dynamic
store
6. How to run a static store
6.1 How to run a static store
6.1.1 Generating
the HTML files from the admin control panel
6.1.2 Generating
the HTML files from Telnet or SSH
6.1.3 Using
cron to generate your HTML files on a scheduled basis
6.1 How to run a static store
A static store is a store where the whole store structure is generated or published
as files. The files generated are available as ordinary HTML files that your visitors
browse. You will need to generate the HTML files of your store if you plan on running
a static store.
Your category/store pages are static pages where the URLs of these pages are
search engine friendly. This means that the crawlers and spiders of search engines
will index your store/category product pages, as there are no complicated CGI script
URLs involved.
You can generate the HTML files from the admin control panel or you may generate
it from the Unix command prompt. You can also use the Unix Cron Program to generate
HTML files on a scheduled basis.
6.1.1 Generating the HTML files from the admin
control panel.
You can generate your entire store’s files from the admin control panel by clicking
the 'Generate HTML Files' link when in the Store Manager. You can also build HTML
files by clicking the ‘To Do’ button. Then click the 'Generate HTML Files' link.
6.1.2 Generating the HTML files from Telnet or
SSH
You can also generate your store from the Telnet or SSH. To generate HTML file
from Telnet/SSH, telnet/SSH into your server/hosting-account. Go to the directory
where generate.cgi resides in. generate.cgi is located in the ‘admin’ directory
where the admin cgi script files resides.
From the Telnet/SSH command prompt, type in:
perl generate.cgi no_delete
or
perl generate.cgi delete
The delete or no_delete option does the following:
no_delete: When this option is used, then generate.cgi will only
generate HTML files, and previously generated files.
delete: When the delete option is used, all previously created
categories and files that was generated will be removed. Use this option
with caution because it will delete all sub categories in the ‘html’ directory.
The ‘html’ directory is the directory where all generated HTML files are stored.
Generating your files from the unix command prompt will be much faster than from
the browser because there are no browser limitations and connections from the
browser to your control panel involved. Build speed increases could be up to a
1000% or more.
6.1.3 Using cron to generate your HTML files on a
scheduled basis
You may use the Unix Cron program to rebuild/generate the HTML files on a daily
or weekly schedule. You can configure the schedule with the Unix Cron program.
You will have to know how the Unix Cron program works. Note that you cannot just
execute generate.cgi with unix Cron. The reason for this is that generate.cgi
needs the working directory to be the directory in which it resides.
To make the directory in which generate.cgi resides in, the working directory,
you can create a Unix shell script, (Almost like a dos batch (.bat) file) that
executes generate.cgi
The shell script should look something like this:
cd /home/yourdomain/www/cgi-bin/admin # Change to generate.cgi's working
dir
perl generate.cgi no_delete # Execute generate.cgi
The shell script has to be executable so that cron can execute it.
IMPORTANT
Remember that when you use CRON you will have to supply parameters to generate.cgi
– The parameters required is delete or no_delete
– See 6.1.2 for more on this.
Also See:
8.5 Generating HTML files
3.1.13 Generated File Extensions
3.1.14 Default Index File
3.1.15 Generating from telnet/ssh
|