Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2007
    Posts
    3
    Plugin Contributions
    0

    Default Modifying tpl_header.php has no effect after moving shop directory

    Hello,

    I recently moved the directory from shop.mydomain.co.uk to 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

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default 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
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2007
    Posts
    3
    Plugin Contributions
    0

    Default 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

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

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

    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).
    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
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jan 2007
    Posts
    3
    Plugin Contributions
    0

    Default 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

 

 

Similar Threads

  1. Moving shop to root directory, questions
    By FukienMan in forum General Questions
    Replies: 4
    Last Post: 14 Dec 2011, 12:59 AM
  2. Problem after I mooved my shop to another directory
    By Ms_X in forum General Questions
    Replies: 7
    Last Post: 16 Jan 2011, 03:59 PM
  3. Home page disappeared after editting tpl_header.php, please help
    By newproduct4you in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 10 Apr 2010, 02:13 AM
  4. Moving SHOW_CUSTOMER_GREETING to tpl_header.php
    By Dunk in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 3 Nov 2008, 09:03 PM
  5. Modifying tpl_header.php with new link to pass cust_id to new page
    By customgt in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 25 Jun 2008, 03:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg