Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Modifying tpl_header.php has no effect after moving shop directory

Modifying tpl_header.php has no effect after moving shop directory

Locked

Views: 1,384

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
25 Jan 2007, 1:50 PM
#1
neil_t avatar

neil_t

New Zenner

Join Date:
Jan 2007
Posts:
3
Plugin Contributions:
0

Modifying tpl_header.php has no effect after moving shop directory

Hello,

I recently moved the directory from shop.mydomain.co.uk to https://www.mydomain.co.uk, together with the associated change of directory from shop to the root. With the relevant editing of the two configuration files.

If I edit the CSS file associated with the template

/includes/templates/myTemplate/css/stylesheet.css

changes are observed and changes the image in

/includes/templates/myTemplate/images/scr_template_default.jpg

are also observed in the site admin.

However, if I edit the tpl_header.php file

/includes/templates/myTemplate/common/tpl_header.php

I find that the changes are ignored. Deleting this file, of indeed the Common directory makes no difference. I originally created the template and was able to make changes.

My guess is that the problem is a result of the move of directory. I was wondering if anyone had experienced a similar problem. I didn't think that the template was compiled/cached but perhaps someone could correct me on this.

Any suggestions appreciated.

Neil

25 Jan 2007, 6:55 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Modifying tpl_header.php has no effect after moving shop directory

Check to see that this file also exists in

/includes/templates/template_default/common/tpl_header.php

26 Jan 2007, 3:21 PM
#3
neil_t avatar

neil_t

New Zenner

Join Date:
Jan 2007
Posts:
3
Plugin Contributions:
0

Re: Modifying tpl_header.php has no effect after moving shop directory

Thanks for your reply,

Think I missed out in the above:
Original directory /shop/...
New directory /...

Yep that file exists. I have done some more investigations:

  1. Replaced default_template directory from another Zen Cart installation. Proving there are no contaminated (miss-named referenced) files within this directory.
  2. Tried selecting the classic green template - no change to the presented template, but the template selection page shows the change to have occured.
  3. Deletion of the common directory within my template has no effect. (includes/templates/myTemplate/common)
  4. Deletion of Default_template directory in both root location and shop directory has no effect. (/includes/templates/template_default) (/shop/includes/templates/template_default).

I am aware that when using ftp it is possible to paste the wrong version of a file, but if I rename the file /includes/templates/MyTemplate/stylesheet.css then the web page falls apart. Likewise images missing from the assocaited image directory are shown to be missing on the webpage.

Does Zen Cart produce a 'compiled' version of the template which it then uses? My understanding was that it didn't. Also when developing the template I was able to make the changes and observe the results.

Neil

26 Jan 2007, 5:50 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Modifying tpl_header.php has no effect after moving shop directory

  1. Deletion of Default_template directory in both root location and shop directory has no effect. (/includes/templates/template_default) (/shop/includes/templates/template_default).
    This is an issue that is difficult to believe due to some fact that is the file is not in the template_default location the override will not function.

Also, do not understand why you have this at the root and in a shop directory

As far as I am aware there is no complied code in Zen Cart - all open source

How about a url

30 Jan 2007, 12:33 PM
#5
neil_t avatar

neil_t

New Zenner

Join Date:
Jan 2007
Posts:
3
Plugin Contributions:
0

Re: Modifying tpl_header.php has no effect after moving shop directory

Thought that it had to be something silly. I have spent my time looking at an HTML front page. :(

To clear up your points:
The site started in the directory /shop, it was moved to the root directory for tidiness. The /shop directory will be deleted.

Compilation of code - Because changing the content in the template directories ws having no effect I was wondering whether the template files were taken individually to compose a 'working' copy (I was starting to get desparate, also compiled was probably the wrong word.) I did wonder whether I was suffering from a caching issue.

Many thanks for your help.

Neil