Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26
  1. #11
    Join Date
    Jan 2011
    Posts
    374
    Plugin Contributions
    0

    Default Re: define main page

    I corrected my earlier post the files were 644 now 777

  2. #12
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: define main page

    So what are the differences in the following two files: tpl_index_default.php tpl_index_categories.php

    As compared to the files of the same name provided in a clean new install located in includes/templates/template_default/templates?
    Last edited by mc12345678; 16 Feb 2018 at 07:41 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: define main page

    Quote Originally Posted by slater555 View Post
    I corrected my earlier post the files were 644 now 777
    Well, there's still some sort of issue in either configuration. Files should still usually be 644 (writeable) or 444 (read only basically).

    Then there's the fact that supposedly something had been changed from the admin for the define_main_page.php file which reportedly the template in question is classic, but the classic file is empty which should be the one edited in that condition and therefore should contain whatever text had been "added". If the content of the other file was seen, then that too is a problem.

    Then there remains the possibility that the "upgrade" isn't pointing to the correct location within the file structure on the admin side. Because, if content had been added to the custom template version, and can be opened from the admin and retains the content entered, then it is such that either the admin is pointing to the wrong location or the previous posting of what is present showed information from the wrong location, but in either respects I can see by looking at the web page referenced in the "verbose" version that the template file has been modified away from the default version of the tpl_index_default.php file because there is no html comment containing <!-- deprecated - to use uncomment this section which exists in the ZC 1.5.5 default version of the template files...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #14
    Join Date
    Jan 2011
    Posts
    374
    Plugin Contributions
    0

    Default Re: define main page

    Even though the winmerge said they were different, when I opened them winmerge said the tpl_index_categories.php were identical.
    This is the difference in the tpl_index_default_php. what is below has been removed from the original 1.5.5f file from the file that is in my site now.

    PHP Code:
    <div class="centerColumn" id="indexDefault">
    <h1 id="indexDefaultHeading"><?php echo HEADING_TITLE?></h1>

    <?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
    <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
    <?php ?>

    <!-- deprecated - to use uncomment this section
    <?php if (TEXT_MAIN) { ?>
    <div id="" class="content"><?php echo TEXT_MAIN?></div>
    <?php ?>-->

    <!-- deprecated - to use uncomment this section
    <?php if (TEXT_INFORMATION) { ?>
    <div id="" class="content"><?php echo TEXT_INFORMATION?></div>
    <?php ?>-->

    <?php if (DEFINE_MAIN_PAGE_STATUS >= and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
    <?php
    /**
     * get the Define Main Page Text
     */
    ?>
    <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
    <?php ?>
    And the files before were 644, I changed them to 777 when you asked to make sure any changes would take effect. they are both 644 again after I checked I changed them back.

  5. #15
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: define main page

    Quote Originally Posted by slater555 View Post
    Even though the winmerge said they were different, when I opened them winmerge said the tpl_index_categories.php were identical.
    This is the difference in the tpl_index_default_php. what is below has been removed from the original 1.5.5f file from the file that is in my site now.

    Code:
    <div class="centerColumn" id="indexDefault">
    <h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
    
    <?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
    <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
    <?php } ?>
    
    <!-- deprecated - to use uncomment this section
    <?php if (TEXT_MAIN) { ?>
    <div id="" class="content"><?php echo TEXT_MAIN; ?></div>
    <?php } ?>-->
    
    <!-- deprecated - to use uncomment this section
    <?php if (TEXT_INFORMATION) { ?>
    <div id="" class="content"><?php echo TEXT_INFORMATION; ?></div>
    <?php } ?>-->
    
     <?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
    <?php
    /**
     * get the Define Main Page Text
     */
    ?>
    <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
    <?php } ?>
    And the files before were 644, I changed them to 777 when you asked to make sure any changes would take effect. they are both 644 again after I checked I changed them back.
    Smoking gun above...

    The absence of that code is why the $define_page is not present. Further there is no reason to remove that code as all that is necessary is to set DEFINE_MAIN_PAGE_STATUS to a value that is less than 1 or greater than 2 for it not to be displayed.


    Okay.. So let's talk a little about upgrading and how to make life easier on yourself...

    There is a template override system...

    One great thing about it, when an upgrade of all of the standard ZC files is performed, the files that have been modified and placed in the template system (ie. directories that don't come with the base install of ZC) do not get overwritten... What that means is that if you are looking at your old store and your new store, you can copy a directory such as : includes/templates/MY_TEMPLATE/ over to the new store and know that the files in the old store are exactly the same as those in the new store... Now... That doesn't mean one is done with the upgrade, because there may have been changes made in the base template, and those changes may need to be incorporated into your override template, but...

    Let's look at what has been done with this site.

    All default files were "installed".. Then, the default files were modified...

    When asked to change to one of the default templates (because ZC now ships with 2 functional templates though they both depend on the template_default files), the expectation is that the template would work as originally designed because the files would be as originally provided. (Whether a problem with the as provided software already exists or not, the point being that would be using the software provided.) None of this was the case for this store and even when asking about how it was upgraded, that particular information was not directly provided as the answer (possibly withheld to answer the other question of template differences) did not elude to making any changes what-so-ever to the template_default files...

    So... May I suggest reading at least the following FAQ(s) and perhaps many others:
    https://www.zen-cart.com/content.php...verride-system
    https://www.zen-cart.com/content.php...late-overrides
    https://www.zen-cart.com/content.php...lly-simplified
    https://www.zen-cart.com/content.php...-zen-cart-site (Pay attention to 1) the very first link about upgrading by rebuild and 2) then at the end of section 1. Preparation regarding the template override system)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #16
    Join Date
    Jan 2011
    Posts
    374
    Plugin Contributions
    0

    Default Re: define main page

    thanks for the lesson. so should i off the bat include the coding in red above into the file now? or do I need to create an override file and read all the stuff first, which I will read today.

  7. #17
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: define main page

    Quote Originally Posted by slater555 View Post
    thanks for the lesson. so should i off the bat include the coding in red above into the file now? or do I need to create an override file and read all the stuff first, which I will read today.
    Depends on your priorities and what needs to happen now... To get the desired result(s) immediately, incorporate the highlighted/removed code (can even put it all back). And from there decide to continue to modify to possibly get the site where you want it and then work towards an improved method that would take all of that into consideration or take a pause and try to get your site back to where it would be suggested to make future management easier...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #18
    Join Date
    Jan 2011
    Posts
    374
    Plugin Contributions
    0

    Default Re: define main page

    thanks so much for your time and patience

  9. #19
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: define main page

    Quote Originally Posted by slater555 View Post
    thanks so much for your time and patience
    Quite welcome. If you methodically place a copy of your current revised template files into the applicable classic directory, then use clone a template to create your own template name, make the new template your active template, you can then restore the default version(s) of the template files (removing those from the classic directory not provided with a default install) and you'll be "in-line" with the FAQS previously posted...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #20
    Join Date
    Jan 2011
    Posts
    374
    Plugin Contributions
    0

    Default Re: define main page

    I opened the first link you provided and went to the link on how to create a new template then following the directions step by step I created a new template called Panhead. At the end of the instructions it said to

    "open your Admin panel and navigate to tools -> template selection. Click the Edit button, then choose CUSTOM from the dropdown menu and click the Update button"

    But there is no Panhead under it. So I am currently at a stand still. I will continue to read the other files and maybe i'll get the answer.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Cannot edit main page from Tools/Define page editor
    By bearlymakinit in forum Customization from the Admin
    Replies: 2
    Last Post: 9 Apr 2015, 02:15 AM
  2. Can't Edit Define Main Page in Define Page Editor
    By robynannw in forum General Questions
    Replies: 2
    Last Post: 8 May 2010, 05:15 PM
  3. Main Page Define - Product Listing above Main Text?
    By SaMortensen in forum Basic Configuration
    Replies: 22
    Last Post: 31 Jul 2009, 05:12 AM
  4. Define Main Page
    By akabigdog in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 10 Apr 2007, 12:55 PM
  5. Main Page(Define Pages Editor) throws page width off
    By audradh in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Jun 2006, 02:36 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