Page 9 of 9 FirstFirst ... 789
Results 81 to 82 of 82
  1. #81
    Join Date
    Nov 2013
    Location
    Hong Kong
    Posts
    43
    Plugin Contributions
    0

    red flag Re: Additional Multiple Featured Products for Front Page

    Hi,

    I have installed this module without any error. But either can I call out the Additional Multiple Featured Products 2, 3, 4 or seeing any extra boxes in Admin> Catalog > Featured Products("Popular Books" in my case).



    My problem is very similar to Picci in P.3 #25, but it is sure that I'd uploaded all the files. And I believe that my SQL is correctly executed, too.

    Here is the code of my tpl_index_default.php
    includes > templates > YOURTEMPLATE > templates > tpl_index_default.php
    PHP Code:
    <div class="centerColumn" id="indexDefault">
    <!--
    <h1 id="indexDefaultHeading"><?php echo HEADING_TITLE?></h1>

    <?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
    <?php 
    echo zen_customer_greeting(); ?>
    <?php 
    ?>

    <?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 ?>

    <!-- Home Page Banners -->
    <?php

      
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET2)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    ?>

    <?php
      
    if (SHOW_BANNERS_GROUP_SET3 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET3)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerThree" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    ?>
    <!-- /Home Page Banners -->


    <?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_FEATURED_PRODUCTS_TWO') { ?>
    <?php
    /**
     * display the Featured Products Two Center Box
     */
    ?>
    <?php 
    require($template->get_template_dir('tpl_modules_featured_products2.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_featured_products2.php'); ?>
    <?php 
    ?>


    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS_THREE') { ?>
    <?php
    /**
     * display the Featured Products Three Center Box
     */
    ?>
    <?php 
    require($template->get_template_dir('tpl_modules_featured_products3.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_featured_products3.php'); ?>
    <?php 
    ?>

    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS_FOUR') { ?>
    <?php
    /**
     * display the Featured Products Four Center Box
     */
    ?>
    <?php 
    require($template->get_template_dir('tpl_modules_featured_products4.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_featured_products4.php'); ?>
    <?php 
    ?>





    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATUREDCL1_PRODUCTS') { ?>
    <?php
    /**
     * display the Featuredcl1 Products Center Box
     */
    ?>
    <?php 
    require($template->get_template_dir('tpl_modules_featuredcl1_products.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_featuredcl1_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
    ?>
    </div>

    The only file I'm not 100% sure is the "BOXES" folder. Should I paste it inside "Functions" or "Modules" instead of: YOURADMIN > includes > boxes ...?



    Hope someone could tell me what I have messed up with.
    Thank You!!

  2. #82
    Join Date
    Nov 2013
    Location
    Hong Kong
    Posts
    43
    Plugin Contributions
    0

    Default Re: Additional Multiple Featured Products for Front Page

    Finally got it!!

    First, I would like to share some tips.
    1.) Use both file from ksookma and bn17311(in #39)
    2.) If you are using v1.5.1 or above version, pls run the SQL code bn17311 provided in #68.
    (Or you may not see the new added bar Featured Products Two, Featured Products Three, Featured Products Four in Admin > Catalog)

    You should get the module correctly installed right now.


    Second, I believe someone may need this.
    So, below is my adjustment to the code.

    Force the "static center-box" to scroll :

    STEP 1)
    includes/templates/YOURTEMPLATE/templates/tpl_modules_featured_products2.php
    includes/templates/YOURTEMPLATE/templates/tpl_modules_featured_products3.php
    includes/templates/YOURTEMPLATE/templates/tpl_modules_featured_products4.php


    In file tpl_modules_featured_products 2, 3, 4 ,
    change this
    PHP Code:
    <div class="centerBoxWrapper" id="featuredProducts"
    to this
    PHP Code:
    <div class="centerBoxWrapper carousel-box" id="featuredProducts"

    Then, in the same files,
    change this
    PHP Code:
      require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_columnar_display.php'); 
    to this
    PHP Code:
      require($template->get_template_dir('tpl_carousel_display.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_carousel_display.php'); 


    STEP 2)
    includes/modules/YOURTEMPLATE/featured_products_two.php
    includes/modules/YOURTEMPLATE/featured_products_three.php
    includes/modules/YOURTEMPLATE/featured_products_four.php


    In file featured_products two, three, four,

    change this (Line #71-72)
    PHP Code:
    $list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent back"' ' ' 'style="width:' $col_width '%;"',
        
    'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' '<a href="' zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' $featured_products->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTHIMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<a href="' zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' $featured_products->fields['products_id']) . '">' $featured_products->fields['products_name'] . '</a><br />' $products_price); 
    to this
    PHP Code:
    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsFeatured float-left ' $additional_class '"' ' ' 'style="width:' $col_width '%;"',
        
    'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' '<div class="columnar-product-info"><div class="columnar-product-img"><a href="' zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' $featured_products->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTHIMAGE_PRODUCT_NEW_HEIGHT) . '</a></div>') . '<div class="product-box-name"><a href="' zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' $featured_products->fields['products_id']) . '">' substr($featured_products->fields['products_name'], 022) . (strlen($featured_products->fields['products_name']) > 22 "..." "") . '</a></div>' $products_price '</div><a class="detail-link" href="' zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' $featured_products->fields['products_id']) . '">'DETAIL_LINK .'</a>'); 

    STEP 3)
    Done, congratulations!


    BEFORE:



    AFTER:

 

 
Page 9 of 9 FirstFirst ... 789

Similar Threads

  1. Featured products on front page
    By Cookiepus in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Aug 2011, 12:30 PM
  2. Changing the front page from Featured Products to New Products
    By philip56 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 17 Oct 2009, 05:50 PM
  3. Replies: 0
    Last Post: 9 Sep 2008, 03:44 PM

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