Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Apr 2010
    Posts
    17
    Plugin Contributions
    0

    Default Overide Implementation

    Hello,

    I've modified the header.php file and created a 'custom' directory as /includes/languages/english/custom and placed the edited header.php file in that directory.

    Tried the same with the html_header.php file

    The changes I made are not being picked up when the page is displayed.

    What is required to get the revised page(s) to be recognized by zen ?
    I have read https://www.zen-cart.com/tutorials/index.php?article=36 several times and can not find a method to connect the new "custom" header.php files to the zen script. The instructions are pretty clear - copy the oringinal file to a custom directory, make the changes to the file in the custom directory and upload the file/directory to the server.

    What am I missing?
    G

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

    Default Re: Overide Implementation

    What is the name of your active template?

    admin > tools > template selection
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Apr 2010
    Posts
    17
    Plugin Contributions
    0

    Default Re: Overide Implementation

    Quote Originally Posted by kobra View Post
    What is the name of your active template?

    admin > tools > template selection
    If I go to Admin > Tools > Template Selection it shows
    Default(All) Classic Contemporary Green classic as the template selected.

    There are no other choices in the drop down list box.

    G
    Last edited by gaver; 26 Apr 2010 at 02:43 AM.

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

    Default Re: Overide Implementation

    If I go to Admin > Tools > Template Selection it shows
    Default(All) Classic Contemporary Green classic as the template selected.

    There are no other choices in the drop down list box.
    I've modified the header.php file and created a 'custom' directory as /includes/languages/english/custom and placed the edited header.php file in that directory.
    Quote Originally Posted by tutorial
    The example template name is /CUSTOM
    The tutorial states that this is an EXAMPLE and further states:
    Quote Originally Posted by tutorial
    The "custom" folder/directory can be WHATEVER you want it to be.... just be consistent in ALL places where you create it so that the overrides work properly.
    It should also state that it MUST match the active template folder name

    https://www.zen-cart.com/tutorials/i...hp?article=142
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Apr 2010
    Posts
    17
    Plugin Contributions
    0

    Default Re: Overide Implementation

    Ok... serriously confused now...

    The current template in use is 'classic'

    Are you saying I need to create new "classic" directories to put the modfied "override" files into?

    First look shows there are already "classic" directorys scattered through out the file structure.

    Or were you demonstrating that I should CAPITALIZE the directory name "/CUSTOM" for the new directories I'm creating?

    Am I missing a step to "register" the custom override with the zen script through the admin panel somewhere?

    As I understand it from the tutorial:

    1) Copy page to be overridden.
    2) Create a new directory named "CUSTOM" or whatever you want
    3) Upload the directory with the modified file to the server.

    That's it! Overide in place.

    Is there a 4th step to register the new "overide" file with the zen script?

    G

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Overide Implementation

    classic is in place mostly to show one where the overrides are possible - - Somewhere it is stated

    "Where ever a classic folder existe, the files directly under that dir can be overridden in a folder you create named for your template."

    That's it! Overide in place.
    But you named the folder custom and you have no template by that name
    Is there a 4th step to register the new "overide" file with the zen script?
    The only thing is that your edited files MUST be in a folder named for your template - Exactly the same as it is in the folder in the templated directory...

    READ THIS TUTORIAL
    https://www.zen-cart.com/tutorials/i...hp?article=142
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Overide Implementation

    Until you create a custom template, a folder with your custom name is useless. A custom template contains at bare minimum a folder structure like /includes/templates/your_template/ and a file /includes/templates/your_template/template_info.php. Copy /includes/templates/template_default/template_info.php into the /your_template/ folder and edit its contents to your information (it's a very small file and should be self-explanatory). To be useful, you will want at least a stylesheet and most likely several other files in the custom folders.

    /CUSTOM/ or /your_template/ are just placeholders for whatever name you choose. It is generally better to keep file and folder names all lowercase, as some operating systems are case sensitive. Also never use spaces in file/folder names.

  8. #8
    Join Date
    Apr 2010
    Posts
    17
    Plugin Contributions
    0

    Default Re: Overide Implementation

    I created a new custom directory under the templates directory.

    Copied the CSS directory and content from the classic directory.
    Created blank image; sidebox; common directorys and a templates directory containing the template_info.php file

    I selected the "CUSTOM" template from the DDL box in tools > template selection and then loaded / viewed the cart.

    All the css buttons / images / header pictures have disappeared.
    ref. http://www.tropicshirts.us/catalog/

    I copied the images from the classic directory to the "custom" directory and retried - no joy!

    Is there another page somewhere that needs to have a variable set to point to the new directory for images and CSS?

    G

  9. #9
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Overide Implementation

    Do you have an includes/templates/YOUR_TEMPLATE/template_info.php file? This is what identifies your custom template to Zen Cart and makes it available in the pull down menu in admin>tools>template selection.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  10. #10
    Join Date
    Apr 2010
    Posts
    17
    Plugin Contributions
    0

    Default Re: Overide Implementation

    Quote Originally Posted by gjh42 View Post
    Until you create a custom template, a folder with your custom name is useless. A custom template contains at bare minimum a folder structure like /includes/templates/your_template/ and a file /includes/templates/your_template/template_info.php. Copy /includes/templates/template_default/template_info.php into the /your_template/ folder and edit its contents to your information (it's a very small file and should be self-explanatory). To be useful, you will want at least a stylesheet and most likely several other files in the custom folders.

    /CUSTOM/ or /your_template/ are just placeholders for whatever name you choose. It is generally better to keep file and folder names all lowercase, as some operating systems are case sensitive. Also never use spaces in file/folder names.
    Sanity Check...
    So... I modify a php page to reflect site specific content - like Page Title ... and rather than overwriting the existing master file - I can create a seperate folder to save the file in - which makes future upgrades easier. The name of the directory that I save the file to is not important as long as I use it consistantly through out the site ... meaning if I use it in the INCLUDES directory and also need to modify a page in the MODULES directory then I need to use the same name for the "custom" folders - I chose to use "custom" as it seems like a good description of what I'm doing ... creating custom pages for the cart.

    But in order for the new custom page to be seen and utilized by Zen - I need to create a new site wide template file - that will be used to produce every page on the site. I start by copying the contents of the existing classic template to a new directory and that directory should (but doesn't have to) be the same name as the custom directories I created for the site unique content that I created by modifying existing templates / pages.

    The name of the new site wide template in the template_info.php file however - must match the name of the directories that I created to store the unique content in.

    Once the new directory is created - I can edit the template_info.php file and enter a name for the template that reflects the name of the directories where I will be storing all edited content.

    The creation of the new Site Wide Template requires that I also create directories for:
    /common
    /css
    /images
    /sideboxes and
    /templates

    The CSS files should be copied from the existing Classic template folder to the new "custom/css" folder and the new template_info.php file should also be saved in the /custom/templates/ folder.

    The html_header.php file is saved in the root templates/custom/ directory.

    Once the directory structures and files are inplace - I can go to the admin panel > tools > template selection and select the newly created "custom" template from the drop down list box and Zen will use that template along with the css & images in the "custom" directory to produce the webpages sitewide.

    Is this correct?

    For some reason - the CSS images have stopped working - most likely a base ref issue somewhere in the constant assignments?

    G

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. DB2 Implementation
    By nmuthu in forum Basic Configuration
    Replies: 1
    Last Post: 30 Mar 2009, 09:20 AM
  2. osTicket Implementation
    By elausell in forum Managing Customers and Orders
    Replies: 0
    Last Post: 30 Jul 2008, 01:35 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR