Thread: Centerboxes

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 36
  1. #21
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Centerboxes

    The settings for the Main Page is based on NO subcategories being displayed ...

    You have your Main Page set for Subcategories displayed and because you have setup your site to show subcategories on the Main Page it is now working like Subcategories so the centerboxes follow the rules for the Subcategories ...
    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!]
    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!

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

    Default Re: Centerboxes

    You could customize your template for the tpl_index_categories.php and change the lines, such as for the Featured centerbox to:
    Code:
    <?php if (($this_is_home_page && SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS) || (!$this_is_home_page && $show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_FEATURED_PRODUCTS')) { ?>
    and that will treat your use of the categories_id 0 for displaying subcategories on your Home page as if this were the regular Home page settings to run in the fashion of tpl_index_default.php ...

    and then do the same for the other centerboxes by altering the code for each section ...
    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!]
    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!

  3. #23
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,550
    Plugin Contributions
    9

    Default Re: Centerboxes

    The settings for the Main Page is based on NO subcategories being displayed ...

    You have your Main Page set for Subcategories displayed and because you have setup your site to show subcategories on the Main Page it is now working like Subcategories so the centerboxes follow the rules for the Subcategories ...
    Ok, bear with me as I'm trying to understand this and explain it better to others ZC users.

    My settings were "Categories - Always Open to Show SubCategories" as YES (1), and then I changed it to NO (0) and didn't make a difference.

    Also "Categories - Always Show on Main Page" was changed with no difference in frontend.

    So there's no switch from admin that can create what I THOUGHT was manageable easy. Is there a way on the switches from ADMIN (not code) that you can create the following:
    ~Show the centerboxes ONLY on MAIN PAGE and NOT on the categories/subcategories pages?~

    I think if I misinterpret this settings, is more likely store owners (no developers) will do as well and probably won't use it (like many other features they don't understand how to handle and become useless).
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

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

    Default Re: Centerboxes

    The settings are based on the 3 index templates:
    tpl_index_default.php - Main Page
    tpl_index_categories.php - Category with SubCategories
    tpl_index_product_listing.php - Below Product Listing

    If Categories do NOT always show on Main Page then you are using:
    tpl_index_default.php - Main Page

    If you pick a Category to Always show, then you will be using either the:
    tpl_index_categories.php - Category with SubCategories
    tpl_index_product_listing.php - Below Product Listing

    depending on if there are Categories or Products for that selection ...

    If you want to alter the way this works, you can customize the:
    tpl_index_categories.php - Category with SubCategories
    tpl_index_product_listing.php - Below Product Listing

    depending on if your Categories Always Show is a Category with Subcategories or Products ...

    When you pick the setting for 0, that is the Category just one higher than the Top Level Categories, so it is showing all the Top Level Categories and those are Subcategories of that highest level ...

    You are trying to use the settings in the Admin in a different manner than designed ...

    I gave you an example of how to customize the:
    tpl_index_categories.php

    that can be used to control this further in the manner that it sounds like you are trying to use it ...

    My example shows the code for the Featured Products, you can use the same method for the other center boxes by using the correct define statements ...
    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!]
    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!

  5. #25
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,550
    Plugin Contributions
    9

    Default Re: Centerboxes

    Ok, I tried those changes on the code but didn't get the results wanted (I even got blank index pages with some changes); but that's understandable because I'm code challenged.

    Like you said... the settings on admin aren't what I thought they were, and maybe since I thought for so long they worked in a way and it's not that way, it's even more difficult to wrap my head around it; because it just doesn't make sense to me.

    I will maybe try this changes when I'm more relaxed and maybe reading it 5 more times.

    Would you be so kind to tell me how am I supposed to have the backend switches when I make the changes on the code? Only for showing the centerboxes ON MAIN PAGE. This is because I noticed that when I change the code I have to change the admin settings in order to it to work or I will get a blank homepage (not all page blank but the content).
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

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

    Default Re: Centerboxes

    Turn ON the Main Page ...

    Turn OFF the SUBCATEGORIES ...

    The fix for your needs to work are to the file:
    index_categories.php

    where you are using the settings from the:
    tpl_index_default.php

    in combination with the existing settings in:
    tpl_categories.php

    And easier way is to copy the code from:
    tpl_index_default.php

    to the tpl_index_categories.php

    And place this code above the:
    </div>

    at the bottom of the file:
    Code:
    <?php
      $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
      while (!$show_display_category->EOF) {
    ?>
    
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?>
    <?php
    /**
     * display the Featured Products Center Box
     */
    ?>
    <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
    <?php } ?>
    
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?>
    <?php
    /**
     * display the Special Products Center Box
     */
    ?>
    <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
    <?php } ?>
    
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?>
    <?php
    /**
     * display the New Products Center Box
     */
    ?>
    <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
    <?php } ?>
    
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?>
    <?php
    /**
     * display the Upcoming Products Center Box
     */
    ?>
    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
    
    
    <?php
      $show_display_category->MoveNext();
    } // !EOF
    } // eof: $this_is_home_page
    ?>
    Now with all the centerboxes turned OFF except the Main Page, you will only see the centerboxes when on the Home Page" ...

    See if that works better for you ...
    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!]
    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!

  7. #27
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,550
    Plugin Contributions
    9

    Default Re: Centerboxes

    That's giving me a blank content.

    Categories - Always Show on Main Page----------------- 1
    Main Page - Opens with Category--------------------------0 (top categories)
    Categories - Always Open to Show SubCategories ----0

    Check it up, you have all details.
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

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

    Default Re: Centerboxes

    Check the directory:
    /cache

    and refresh it ...

    what errors are you showing?
    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!]
    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!

  9. #29
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,550
    Plugin Contributions
    9

    Default Re: Centerboxes

    [02-Apr-2011 19:36:01] PHP Parse error: syntax error, unexpected '}' in /home/***/public_html/***/includes/templates/bluesteel/templates/tpl_index_categories.php on line 132


    That line is:
    Code:
    <?php
      $show_display_category->MoveNext();
    } // !EOF
    } // eof: $this_is_home_page   (this is line 132)
    ?>
    </div>
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

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

    Default Re: Centerboxes

    Start with a clean tpl_index_categories.php ...

    Ad the code from post #26 above the:
    </div>

    at the bottom of the file ...

    Turn ON the settings for the Show whatever Main Page settings ...

    Turn OFF the settings for the Show whatever Subcategories settings ...

    You should now see on the Home Page the Categories in the middle and the centerboxes below them ...

    When navigating the Categories Menu you should only see the Categories and no centerboxes ...
    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!]
    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!

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v154 Homepage centerboxes
    By Nick1973 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 19 Oct 2015, 12:03 PM
  2. adding new centerboxes?
    By MB1 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 11 Aug 2010, 09:15 PM
  3. Centerboxes Formatting
    By WellCool in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Apr 2009, 08:21 AM
  4. Modifying Centerboxes
    By CREEPUR in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 8 Jul 2008, 02:24 AM
  5. Headers on Bottom of Centerboxes
    By pensive612 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Jun 2006, 07:33 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