Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Switching templates front end

    Can someone remind me which file controls the template selected?

    I want to override it so that I can use a query string the set a session to switch between the current on and a new one I will be building.

    If this has been discussed before and you know where the thread is id be grateful for a link :)

    Cheers

    Phil
    Phil Rogers
    A problem shared is a problem solved.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,949
    Plugin Contributions
    96

    Default Re: Switching templates front end

    /includes/init_includes/init_templates.php

  3. #3
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Switching templates front end

    Quote Originally Posted by philip937 View Post
    Can someone remind me which file controls the template selected?

    I want to override it so that I can use a query string the set a session to switch between the current on and a new one I will be building.

    If this has been discussed before and you know where the thread is id be grateful for a link :)

    Cheers

    Phil
    The template is designated in the database, not a file. However, if a uri type string is desired to change the template, I'm thinking that perhaps something in the index.php file so that a setting is checked but not directly applied to the system. By that I mean you don't want to just grab the information and use it directly, but have some form of cleansing of the input. If there are only two to switch between maybe just having a value of true goes to the one template after also verifying that the value is set, and if the value is set and equal to false goes to the other.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Switching templates front end

    Cheers lat9 :)

    Do you know if zen cart has any custom ways sessions are set or is it standard php ie:

    PHP Code:
    $_SESSION['template_switch']=1
    Or is there a slightly different way? I assume setting custom sessions is safe as long as they don't conflict with any existing ones?
    Phil Rogers
    A problem shared is a problem solved.

 

 

Similar Threads

  1. v139b Crisis! Back end works, front end does not!
    By Tamuren in forum General Questions
    Replies: 2
    Last Post: 25 Jan 2012, 02:22 AM
  2. Categories not showing up in front end but it is added in back end
    By raaj.smvec in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 22 Apr 2010, 12:06 PM
  3. switching templates
    By RichardH in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Jul 2008, 10:36 PM
  4. switching templates
    By onakat in forum Customization from the Admin
    Replies: 6
    Last Post: 3 Apr 2007, 10:18 AM
  5. Auto-switching DB login to end 1226 Error
    By Camarilladee in forum Basic Configuration
    Replies: 7
    Last Post: 2 Jun 2006, 05:56 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