Results 1 to 10 of 21

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Posts
    163
    Plugin Contributions
    0

    Default move specials above main page editor

    I have been trying to move the specials on the home page of the store above the area where the define_main_page text goes. I have looked at a few other threads and have moved things around in the tpl_index_default.php page and it either removes the main page text or removes it all. Can someone please help me? The domain is: concealmentindustries.com/catalog

    Thanks in advance!

  2. #2
    Join Date
    Mar 2007
    Posts
    159
    Plugin Contributions
    0

    Default Re: move specials above main page editor

    I can tell you what its doing, but I haven't quite figured out how to fix it....

    there is a loop going on after it checks a database to see what should be displayed on the page, so moving the code for special products to be before the main page text breaks it as it does not have access to the db to see if it should be displayed or not.

    moving the display main text to below it in the code results in it being displayed several times as the code loop executes.
    so.....if your sure you will never ever want to turn it off from admin......

    cut

    Code:
    <?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 } ?>
    and paste

    Code:
    <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
    somewhere above

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

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: move specials above main page editor

    What you want to end up with is the code in blue before the code in red
    Code:
    <div class="centerColumn" id="indexDefault">
    <h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
    
    <?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_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 } ?>
    Zen-Venom Get Bitten

  4. #4
    Join Date
    Mar 2007
    Posts
    159
    Plugin Contributions
    0

    Default Re: move specials above main page editor

    Quote Originally Posted by kobra View Post
    What you want to end up with is the code in blue before the code in red
    Code:
    <div class="centerColumn" id="indexDefault">
    <h1 id="indexDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
    
    <?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_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 } ?>-->
    
    blah 
    blah 
    blah
    except the database doesn't get read until

    Code:
    <?php
      $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
      while (!$show_display_category->EOF) {
    ?>
    which is after the TEXT_MAIN, which is why I chopped out the if{} statement

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: move specials above main page editor

    I see this??? Did you try it??

    I have successfully moved "Featured" and above the db query so it functioned in my case...but it would not be difficult to place this above the specials.
    Code:
    <?php
      $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
      while (!$show_display_category->EOF) {
    ?>
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Mar 2007
    Posts
    159
    Plugin Contributions
    0

    Default Re: move specials above main page editor

    I didn't try to move the db check above it but I did attempt to move the TEXT_MAIN down below, the loop gets called I think 4 times so it just repeated the text block over and over. when I tried moving the whole chunk (with the if block)I don't think it got executed but I was doing my testing with future releases.
    *shrug* what ever works

  7. #7
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default Re: move specials above main page editor

    I tried moving this code to display the specials box at the top of the main page. but it did not move the specials up and it placed the main page image and text on the main page 3 times...

    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_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_CUSTOMER_GREETING == 1) { ?>
    <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
    <?php } ?>
    any ideas on what to try next to get the specials to appear at the top of the main page?

    thanks.

 

 

Similar Threads

  1. Specials on main page above greeting
    By netgirlz in forum Setting Up Specials and SaleMaker
    Replies: 2
    Last Post: 6 Jan 2010, 04:01 AM
  2. Move Header Above the Main Wrapper
    By acreativepage in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Oct 2009, 08:51 AM
  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. move specials up on main page
    By gsdcypher in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Sep 2008, 05:11 PM
  5. New products/specials above my main index page - how can I fix this?
    By stormysar in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 May 2007, 02:46 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