Saturday, August 05, 2006

TemplateMonster Template Installation

After having used XAMPP to install Apache, MySQL and PHP, I am now ready to install a web site template from TemplateMonster.

I purchased and downloaded a template and copied the unzipped files to ../htdocs/shop. During the install of the template, which is just like the install of the dummy catalog that comes with osCommerce, make sure to check the box to save sessions to the database, not files. I had problems with files. It complained about a tmp directory not existing. I created one but it still gave me problems.

I also went in and changed the directory security in my httpd.conf file to protect the admin directory. See previous post for details.

There were some sql errors after installing the template. I had to modify some of the queries to make them work. I found help on the osCommerce site.

First change is here. Do what is suggested in post dated 11 Nov 2005 17:16:06.
Second change seems to be related to MySQL4 vs MySQL5. I have MySQL5 running. In order to fix the queries, I had to find out which .php file(s) the queries were in. I couldn't search the .php files using Windows Explorer because Explorer is stupid. I had to download a little utility called XP_FileFilter.exe from here, that helps you enable searching for files containing text with files that have "unregistered extensions".

I did what was suggested in the post dated 15 Jun 2006 07:18:13 of the second change link above. The change needed to be made in the \htdocs\shop\index.jsp file. (Thank you XP_FileFilter!)

Now the admin pages...
I browsed to the admin site, entered my username and password, and got this:

Fatal error: Cannot re-assign $this in C:\Program Files\xampp\..\includes\classes\upload.php on line 31

Fix is here. Change $this = null; to unset($this);

Other sql query fixes
modified products_new.php - changed from clause to have inner join instead of comma
modified index.php - changed all from clauses to have inner joins instead of commas
modified index.php - changed a reference from p2c.products_id to p.products_id in one of the queries. p2c was not an alias in the query.

No comments: