Results 1 to 7 of 7
  1. #1
    Join Date
    May 2009
    Posts
    5
    Plugin Contributions
    0

    Default Template Selection Fails To Change

    When I select a different template it always reverts back to the /template_default/ The process I follow is according to the directions found in the docs. Tools > Template Selection > Edit > Select Template > Update. Then I go to Layout Boxes Controller > Reset. After pressing reset I go back to the Template Selection and the Default template is the active one. This is confirmed by not being able to edit or modify any files in the custom template and see the results of the edit. A page source view also confirms that the new template is not active.

    The template I'm trying to change to is a custom template. It was created according to this article that explains how to create a custom template. I also found some good info in the wiki as well as the suggested folder structure here.

    I have tried setting AllowOverride to Limit and renaming the mentioned .htaccess without success (yes, a restart was done) according to this article.

    I've double checked the paths in the config files and they are correct. File permissions are correct throughout.

    What am I overlooking????

    As an aside to this problem, I must say that the ZC template system is most interesting (and confusing). I've worked with numerous CMS's, some extensively, and run across some tough cases before but this is by far the most challenging!!! Trying to figure this out has nearly caused me to bring out the old osCommerce and give tables a go. Since I'm new to ZC I'm assuming there is a better one in the works with v2.0. Also, being familiar with osCommerce I must tip my hat to the work that was put into putting ZC together from the original cart engine.
    Zen Cart v1.3.8a, Full access to dedicated root server: CPU 2.00GHz, Apache/2.2.3 (CentOS 5.2), PHP v5.2.8, MySQL 5.0.58

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Template Selection Fails To Change

    If you're reverting to template_default, (not Classic), you're doing something wrong when creating your CUSTOM template. May be your CUSTOM folders are in the wrong place(s) or you haven't copied the files into the CUSTOM folders.

    A link to your site might help us.

  3. #3
    Join Date
    May 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Template Selection Fails To Change

    stevesh, Thanks for the quick reply. Unfortunately I am unable to offer a link by request of the owner. The site is password protected until launch. Please see PM.

    I'm pretty sure the directory and file structure is correct, provided the docs, articles and wiki are correct. It is possible/probable that I have missed something though.
    Zen Cart v1.3.8a, Full access to dedicated root server: CPU 2.00GHz, Apache/2.2.3 (CentOS 5.2), PHP v5.2.8, MySQL 5.0.58

  4. #4
    Join Date
    May 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Template Selection Fails To Change

    Hmmm... I tried reinstalling and during the Prerequisites section there was this line: PHP open_basedir restrictions = /var/www/vhosts/mysite.com/httpdocs:/tmp Marked as a caution. What I'm finding in my httpd.conf file is that it is set to allow access to /tmp for this domain. I wonder if this could have an impact on how templates are used. Because of the system's settings it shouldn't even be showing up.
    Last edited by jholzy; 13 May 2009 at 04:39 AM. Reason: clarification
    Zen Cart v1.3.8a, Full access to dedicated root server: CPU 2.00GHz, Apache/2.2.3 (CentOS 5.2), PHP v5.2.8, MySQL 5.0.58

  5. #5
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Template Selection Fails To Change


  6. #6
    Join Date
    May 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Template Selection Fails To Change

    Thanks for the tip. I've already been down that road (saw that article) without success. That's actually the article that got me to looking at this. I'm not sure that the open_basedir is the culprit but I've learned more about that INI setting than I ever wanted to know! I haven't been able to dig out anything in the code that looks like it requires this. (fopen(), chdir(), etc)
    Zen Cart v1.3.8a, Full access to dedicated root server: CPU 2.00GHz, Apache/2.2.3 (CentOS 5.2), PHP v5.2.8, MySQL 5.0.58

  7. #7
    Join Date
    May 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Template Selection Fails To Change

    Re-install log:

    • new directory
    • new database.
    • direct download to server
    • unzipped contents to new directory
    • read through installation docs!!
    • run install script
    • follow prompts and correct issues
    • this is where the problem with PHP open_basedir restrictions = /var/www/vhosts/mysite.com/httpdocs:/tmp was marked as a caution. This was a little misleading because it said it was not necessarily an issue to prevent installation.


  8. This is how I "fixed" the open_basedir problem. I'm running Plesk 9.0.1 so it's different if you are using cPanel or another CP. The point is to disable the open_basedir setting for a specific domain if you are on a multi-user environment without disabling it for all. Seems to me that this really shouldn't be a function of PHP but it is (sans safe_mode)...

    locate your domains vhost.conf: for me it was /var/www/vhosts/(mysite.com)/conf/ Then vi vhost.conf. Add the following and save:

    <Directory /var/www/vhosts/somedomain.com/httpdocs>
    php_admin_flag engine on
    php_admin_value open_basedir none
    </Directory>

    Next, run this command: /usr/local/psa/admin/sbin/websrvmng -v -a
    Then restart apache: httpd -k restart.

    You should be good to go.

    • this resolved the issues in the Prerequisites section of the installation script.
    • finished the install without any warnings or issues.
    • all CHMOD's done
    • install directory removed.
    • checked a previous installation of ZC that was having the template change problem located at /zc and the problem appears to have been resolved.


    Now to check the new install to see if it works as expected.
    • create a new skeleton template:

    (Read docs, articles and wiki for some great info)

    This was supplied by stevesh (thanks!):
    Here's how I do it:

    1. Create a folder with the name of your custom template (call it CUSTOM) everywhere you see a 'Classic' folder, and at the same level. I have a folder 'tree' that I made that I just upload, after changing the CUSTOM folder names if necessary.

    2. Copy template_info.php from includes/templates/classic to includes/templates/CUSTOM and edit it to reflect the name of your template. That's the file which will give you the option in Admin - Tools - Template Selection.

    3 - Copy the folders (with files) from includes/templates/classic to includes/templates/CUSTOM

    4. Select your CUSTOM template in Admin - Tools - Template Selection and click Reset at the bottom of the Layout Boxes Controller page.

    Your site should resemble the 'Classic' template that appeared on the initial installation.
    Basically, the only required folder is the one located at includes/templates/CUSTOM. Any customization in this folder will override the default settings. However, in order to make serious changes you will need to create other /CUSTOM folders (takes a little searching to find them) like mentioned in stevesh's short tute above. For example: there is a classic folder located at includes/language/classic. Just create your /CUSTOM folder here and copy the english.php to that folder to be able to edit the english.php file without loosing the edits in an upgrade. Once english.php is in the /CUSTOM folder the system will automatically use that instead of the system defaults.

    • go to admin and select new template
    • reset column boxes
    • check that new template works
    • SUCCESS!!!
    [insert extremely annoying clapping smiley here]
    Thanks for the help, stevesh!
Zen Cart v1.3.8a, Full access to dedicated root server: CPU 2.00GHz, Apache/2.2.3 (CentOS 5.2), PHP v5.2.8, MySQL 5.0.58

 

 

Similar Threads

  1. Replies: 6
    Last Post: 7 Feb 2015, 05:16 PM
  2. Can't seem to get template on the admin/tools/template selection
    By avmejias in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 19 Aug 2012, 07:39 AM
  3. Template selection page not viewable after uploading custom template
    By mek113 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 28 Apr 2011, 05:16 PM
  4. Template Selection Won't Change
    By becca428 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 31 Oct 2009, 05:59 AM
  5. how to change template selection?
    By huangyanyan in forum General Questions
    Replies: 1
    Last Post: 23 Oct 2009, 03:47 AM

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