Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2005
    Posts
    89
    Plugin Contributions
    0

    Default Admin modification vs. .php file modification??

    If I make changes to my pages through admin, am I changing the .php file in the main template directory or my "custom" deirectory?

    Shouldn't I be instead making the changes directly to the .php file (in text editor) and then uploading to my "custom" template?

    For example....my main page still reads:
    "This section of text is from the Define Pages Editor located under Tools in the Admin. To remove this section of the text, delete it from the Define Pages Editor."

    So when I go to "define pages editor" in admin it just asks me which .php file I'd like to alter. Well shouldn't I be doing that in my favorite text editor instead. At least that is my preference but how do I ever know what .php file corresponds to the text I want to change. In other words what is the .php file I need to alter to change the text on the main page and how do I find it etc..?

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

    Default Re: Admin modification vs. .php file modification??

    All the files that you can edit from within admin should have been copied from
    includes/languages/english/html_includes - to includes/languages/english/your_template_name/html_includes

    Then you can edit them via the editor in admin or locally with your editor and this is where they should go.

    If you install additional templates, then you need to make additional copies of this and other customized files for that template.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Admin modification vs. .php file modification??

    there are certain php pages, ( the ones in the dropdown list ) that you can change on the fly,

    you will want to choose the define_main_page.
    Zen cart PCI compliant Hosting

  4. #4
    Join Date
    Sep 2005
    Posts
    89
    Plugin Contributions
    0

    Default Re: Admin modification vs. .php file modification??

    I just was reading through step by step directions for the override templates again and I don't see anywhere that it says to copy over the "html_includes" folder. Oh well I'm taking your word for it.

    But what I don;t get is if I DIDN'T have the "html_includes" folder in there before and I was making changes through the admin with my custom template selected, what files was it altering? The ones in template_main?

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Admin modification vs. .php file modification??

    When in the Admin and working on the Tools ... Define Page Editor ...

    When you select a file to edit, it shows you the path to the file you are working on ...

    Note: you should always edit the files located in your current template override directory, Example: /languages/english/html_includes/
    Be sure to make backups after changing your files.

    Editing file:
    /home/myotherp/public_html/zencart_v137/includes/languages/english/html_includes/define_checkout_success.php
    In this example, I have a template and override setup for /sample

    However, because I do not have a copy of the files for my template setup in:
    /includes/languages/english/html_includes/sample

    I see that I am editing the files in:
    /includes/languages/english/html_includes

    Any file that is changed by you should always be in a template and override directory ...

    The name always matches your templates and overrides directory for your website design ...

    When you see something that does not indicate that directory name ... this means you are editing a core or original file ...

    To make this easier to know where to utilize the template and override directories ... there is always a /classic

    This is a key to alert you that you should be using a templates and overrides directory in the section of language files, or template files, or code files ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

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

    Default Re: Admin modification vs. .php file modification??

    Oba-san,
    public_html/zencart_v137/
    I sees a peek into the future!!
    Zen-Venom Get Bitten

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

    Default Re: Admin modification vs. .php file modification??

    recordshow,
    Quote Originally Posted by recordshow
    I just was reading through step by step directions for the override templates again and I don't see anywhere that it says to copy over the "html_includes" folder.
    Quote Originally Posted by wiki
    Whenever you plan to make changes to a file, see if it can be overridden first.
    Files can be overridden if

    * The directory where the file resides holds a sub-directory named "Classic".
    * The current path includes "template_default" or a template directory, such as "classic". Eg. /includes/templates/template_default/common/

    Unfortunately, not all files can be overridden at this time. Nothing under the admin directory can be overridden yet.
    Maybe some inference required...but always check to see if there is a
    "classic" directory/folder where the files that you might edit are and then if so ALWAYS make a copy and a directory/folder that is inline with your template name and edit only this file.

    So if you look at the html_includes directory, you will see that there is a classic directory there, ergo override it.

    While developing, I set permissions to all core files to un-writeable, cause I am old and forget....this prevents me from editing directly. All overridden files remain writeable until I am finished.
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. v151 questions about Template Modification File Structure
    By Peter_AimImports in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 15 Nov 2012, 06:41 PM
  2. v139h Modification to category_row.php
    By strelitzia in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 5 May 2012, 02:51 PM
  3. category_row.php modification
    By strelitzia in forum General Questions
    Replies: 0
    Last Post: 3 Dec 2011, 12:27 AM
  4. configure.php modification
    By godt in forum Installing on a Linux/Unix Server
    Replies: 9
    Last Post: 20 Mar 2008, 06:57 AM

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