Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2011
    Location
    Texas, USA
    Posts
    171
    Plugin Contributions
    0

    Default Finding the right files

    Please show me the correct procedure to find the correct file. I always go to a wrong file.

    In this instance, I look for where to remove the zen cart image from the home page. (Have you got yours yet? etc.)

    I use Firefox to look at the site and fire bug to show different elements.

    I select the element in Firefox and Fire bug shows this element
    <div id="indexDefaultMainContent" class="content">

    So now I take "indexDefaultMainContent" and use Developer Tools in Admin to find the file.

    I look up in all files - All files Catalog/Admin - PHP and CSS.

    I find this:
    file is in /public_html/includes/templates/template_default/templates/tpl_index_default.php
    The code is "Line #38 : <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div> "

    So now I know which file to go to but there is nothing what I want to change!!

    I do not know PHP yet but I think the reference here is to another file, $define_page. I cannot find this file anywhere. I look all over the file structure for hours so now I ask if it exists at all.

    Also please, is what I do, the correct way or must I do something different?

    thank you
    Ivanna

  2. #2
    Join Date
    Jan 2011
    Location
    Texas, USA
    Posts
    171
    Plugin Contributions
    0

    Default Re: Finding the right files

    Now I find how to make the changes in Admin/Tools?Define Pages Editor.

    This edits the page public_html/includes/languages/english/html_includes/define_main_page.php

    So now a new questions also arises. the file did not save in my folder for instance

    public_html/includes/languages/barebones/html_includes/define_main_page.php

    Should it save in barebones or in english folder?

    I understand all changes must be in barebones folders.

    Am I doing this wrong also?

    thank you
    Ivanna

  3. #3
    Join Date
    Jul 2011
    Location
    Illinois
    Posts
    20
    Plugin Contributions
    0

    Default Re: Finding the right files

    When looking for the files I need to edit, I use this tutorial:
    https://www.zen-cart.com/tutorials/i...hp?article=132

    I actually printed it out, and keep it near my computer for quick reference. It's been really helpful in finding the default files to download and change. To upload them back, I just follow the file path, making sure to include my custom template folder at the end.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Finding the right files

    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jan 2011
    Location
    Texas, USA
    Posts
    171
    Plugin Contributions
    0

    Default Re: Finding the right files

    Thank you both for your replies but I do not think the questions are answered.

    In my first question I ask if I am doing the search correct. From the tutorial, I think perhaps I am but maybe with not the right words because sometimes I do not find the files.

    I also have the list of folders and files but for instance, if I look for something that I think is perhaps in includes/languages/english/*.php there are 73 files to go through. I think it is because I am not searching correct that I become frustrated. Sometimes it is ok and I go straight to a file and the line I want, other times it is hard.

    I think I must just practice at that.

    In my second question I ask if anything that is changed in Admin should be in my template folder. Today I make a change in Admin to define_main_page.

    This change is saved in public_html/includes/languages/english/html_includes/define_main_page.php

    My question is this, should it have saved to public_html/includes/languages/barebones/html_includes/define_main_page.php ?

    Thank you both for your help
    Ivanna

  6. #6
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Finding the right files

    Quote Originally Posted by Ivanna View Post
    In my first question I ask if I am doing the search correct. From the tutorial, I think perhaps I am but maybe with not the right words because sometimes I do not find the files.
    I'm sure what you've been told is correct, but it's not the only way to find things. I almost never have used the admin tools to find things. I have a complete and untouched set of 1.3.9h files and a complete up-to-date backup of my site files here on my local hard drive. I use a programmer's text editor which has the ability to do a multi-file search across specified folders. That, plus the use of Firebug in Firefox, give me the ability to quickly and eaily find anything I want to find in Zen Cart. I look at the site in Firefox/Firebug to get a clue as to what I'm trying to find, then I search for that in the files here, comparing untouched files to my modified (perhaps) site files as needed.

    Of course, it took some time and practice to figure out the subtler aspects of what to look for, but that will come as you work with Zen Cart.

    Quote Originally Posted by Ivanna View Post
    In my second question I ask if anything that is changed in Admin should be in my template folder. Today I make a change in Admin to define_main_page.

    This change is saved in public_html/includes/languages/english/html_includes/define_main_page.php

    My question is this, should it have saved to public_html/includes/languages/barebones/html_includes/define_main_page.php ?
    I find that my changes are recorded in the first of those paths. I do not have an html_includes folder in the second of those paths you mention.

    Rob

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

    Default Re: Finding the right files

    By default, your define page edits will be saved in the base /includes/languages/english/html_includes/ folder.
    If you manually copy the file to /includes/languages/english/html_includes/your_template/, the Define Page Editor will then save further changes in it to your custom template folder.


    Also, you would always use a folder path like /includes/languages/english/html_includes/barebones/, not
    /includes/languages/english/barebones/html_includes/.

  8. #8
    Join Date
    Jan 2011
    Location
    Texas, USA
    Posts
    171
    Plugin Contributions
    0

    Default Re: Finding the right files

    Once again thank you for your help with this matter. I understand much more now.

    Rob, please what is the editor that you use? I use notepad2 but I do not think it does the things like multi-file search

    I need to do it right. If I can show my boss I can do it he said he will pay for college.

    thank you
    Ivanna

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

    Default Re: Finding the right files

    Notepad++ does have the ability to search in whole folders etc. Click on "Find..." under Search and look at the "Find in Files" options. I haven't used these yet, but it looks pretty powerful.

  10. #10
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Finding the right files

    I use BBEdit, but it only runs on Mac OS. There are similar editors for Windows, but I don't know what they might be.

    Rob

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. finding files
    By JasonRocket in forum General Questions
    Replies: 1
    Last Post: 13 Jan 2009, 04:11 PM
  2. Help finding price calculator files
    By Grind in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 20 Aug 2008, 06:32 PM
  3. Help finding files...
    By nrg77 in forum General Questions
    Replies: 4
    Last Post: 16 Sep 2007, 06:17 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