Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2008
    Posts
    385
    Plugin Contributions
    0

    Default Pointing downloaded templates to existing files

    I've tried several of the downloadable templates, and I have a general question. Some of the templates point to existing files and some don't. I can tell because with some templates, my store name and customized main page and other page scripts show up, and with others the default text that needs to be changed show up.

    So what in the downloaded files can be safely changed, and how? Obviously I don't want to change the colors, size, or location of items. I just want the new templates to pick up the store name and various pages that I've edited. And I'd rather change the template once, to point to the edited files (and edit them when I want to make changes), than copy the edited pages all over the place whenever I change templates.

    If someone PHP- and CSS-knowledgable could tell me what to do, I'd sure appreciate it.
    [FONT="Times New Roman"]Sylvia
    PM at your own risk, I don't check in regularly!
    MamaSylvia.com My ZenCart tutorial
    [/FONT]

  2. #2
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Pointing downloaded templates to existing files

    Quote Originally Posted by mamasylvia View Post
    I've tried several of the downloadable templates, and I have a general question. Some of the templates point to existing files and some don't. I can tell because with some templates, my store name and customized main page and other page scripts show up, and with others the default text that needs to be changed show up.

    So what in the downloaded files can be safely changed, and how? Obviously I don't want to change the colors, size, or location of items. I just want the new templates to pick up the store name and various pages that I've edited. And I'd rather change the template once, to point to the edited files (and edit them when I want to make changes), than copy the edited pages all over the place whenever I change templates.

    If someone PHP- and CSS-knowledgable could tell me what to do, I'd sure appreciate it.
    copy any files you edit to the appropriate template folder:

    for instance if you edit includes/templates/template_default/templates/tpl_product_info_display.php

    you would copy the and save the edited file to
    includes/templates/NEW_TEMPLATE/templates/tpl_product_info_display.php

    The upload this to your server.

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

    Default Re: Pointing downloaded templates to existing files

    The practicality of this probably varies by template. Some templates only touch a few files and you might be able to do some recoding to make the basic custom versions be used. Some templates may have edits in some of those files already, and thus can't use another file version at the same time.

    At any rate, it will be a lot more complicated to change some of the template file calls than to copy the edited files into each template.

    And really, if your customizations are showing up in other templates, that means the custom text is in a core file, which is going to be erased when you upgrade to a newer version of Zen Cart. You need to copy all of your customizations into template override folders where they will be safe. Remembering which core files you edited six months from now is going to be chancy at best.

  4. #4
    Join Date
    Feb 2008
    Posts
    385
    Plugin Contributions
    0

    Default Re: Pointing downloaded templates to existing files

    > copy any files you edit to the appropriate template folder

    This is exactly what I'm trying NOT to do. First, because it's a pain, and second, because some of the templates have their own files and some don't. It's actually less of a pain (to me) to go through all the possible files ONCE and then have everything looking to the same fileset than try to remember when I switch templates "okay, now what do I need to copy where?"

    > the custom text is in a core file, which is going to be erased when you upgrade to a newer version of Zen Cart

    Actually, that has already occurred to me. But hopefully in 6 months, I'll be such a Zen whiz that I'll know which files I need to keep safe.

    > You need to copy all of your customizations into template override folders

    <perking ears up> Huh? What are override folders and what do they do? Can I put the page files in one now and point the various templates to it?

    Always eager to learn,
    [FONT="Times New Roman"]Sylvia
    PM at your own risk, I don't check in regularly!
    MamaSylvia.com My ZenCart tutorial
    [/FONT]

  5. #5
    Join Date
    Feb 2008
    Posts
    385
    Plugin Contributions
    0

    Default Re: Pointing downloaded templates to existing files

    I found some tutorials on the override system and read them.

    Okay, now I'm going to get frustrated again. Nearly all my problems as a beginning Zen user came because people told me to copy my changes into the /custom subdirectory. THAT NEVER WORKED! Let me emphasize: THAT NEVER NEVER NEVER WORKED! Every change that I successfully made came when I edited the file according to directions on my own computer, saved the changed file to a /custom directory on my own computer, then uploaded the changed file into the ORIGINAL directory on the server. (That way, I had a copy of the original file in case my edited file blew up the store, which happened way too often.)

    My ZenCart version 1.3.8a does NOT look in a /custom directory first before it looks at the default file. Is there a switch somewhere I should have turned on?
    [FONT="Times New Roman"]Sylvia
    PM at your own risk, I don't check in regularly!
    MamaSylvia.com My ZenCart tutorial
    [/FONT]

  6. #6
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Pointing downloaded templates to existing files

    Quote Originally Posted by mamasylvia View Post
    I found some tutorials on the override system and read them.

    Okay, now I'm going to get frustrated again. Nearly all my problems as a beginning Zen user came because people told me to copy my changes into the /custom subdirectory. THAT NEVER WORKED! Let me emphasize: THAT NEVER NEVER NEVER WORKED! Every change that I successfully made came when I edited the file according to directions on my own computer, saved the changed file to a /custom directory on my own computer, then uploaded the changed file into the ORIGINAL directory on the server. (That way, I had a copy of the original file in case my edited file blew up the store, which happened way too often.)

    My ZenCart version 1.3.8a does NOT look in a /custom directory first before it looks at the default file. Is there a switch somewhere I should have turned on?
    "/custom" is a generic term used int the tutorials to describe whatever new directory you decide to use. These directories can be named anything you want.

    You are using the mystic river template (the override directories for that template are called "mystic")

    if you edit any files they should be saved in the "mystic" folder(s)

  7. #7
    Join Date
    Feb 2008
    Posts
    385
    Plugin Contributions
    0

    Default Re: Pointing downloaded templates to existing files

    > "/custom" is a generic term

    I understand that. But I did set up custom subdirectories when I first started trying to make modifications, and uploading the changed files into them did NOT product a change in the store appearance.
    [FONT="Times New Roman"]Sylvia
    PM at your own risk, I don't check in regularly!
    MamaSylvia.com My ZenCart tutorial
    [/FONT]

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

    Default Re: Pointing downloaded templates to existing files

    Then you would have to change the template to 'Custom' and be sure you edited the template_info.php file.

    (That's if I understand your last post correctly - Zencart doesn't in any instance automatically look for a 'Custom' override folder.)

  9. #9
    Join Date
    Feb 2008
    Posts
    385
    Plugin Contributions
    0

    Default Re: Pointing downloaded templates to existing files

    I accidentally figured out how to do what I wanted. Zen DOES look for the page files in the includes/languages/english/html_includes folder if that folder doesn't have a sub-folder with the template name! All I had to do was delete the page files from the sub-folders and now Zen is doing exactly what I wanted.

    I understand the concern about overwriting files when upgrading, but sheesh, why doesn't Zen Cart look for changed files during upgrade? That feature has been around a LONG time in other programs. Netscape, Office, and a few other programs on my laptop do it. Even Managing Your Money, an old DOS program I was a beta tester for, looked for changed files and kept them intact when upgrading. (I'm a great beta tester, if it's possible to break the program I do -- without trying.)

    IAC, if the next version of Zen Cart *doesn't* identify and convert changed files, it will be easy enough to simply do a new install instead of an upgrade and then copy over the test from my changed files.
    [FONT="Times New Roman"]Sylvia
    PM at your own risk, I don't check in regularly!
    MamaSylvia.com My ZenCart tutorial
    [/FONT]

 

 

Similar Threads

  1. Question about where files are pointing to
    By ekon79 in forum General Questions
    Replies: 1
    Last Post: 7 Apr 2011, 05:33 AM
  2. How to change to the new templates I just downloaded?
    By orientalunique in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 22 Jul 2010, 06:46 PM
  3. Installing downloaded Files
    By barryf in forum Managing Customers and Orders
    Replies: 1
    Last Post: 21 Nov 2009, 05:28 AM
  4. Using Downloaded Templates
    By CemeteryWinter in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Dec 2006, 10:08 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