Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25
  1. #11
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,872
    Plugin Contributions
    96

    Default Re: Featured Listing Not displaying on Product Listing Page

    Hmm, what happens if you temporarily disable your URL rewriting plugin? Does the Featured Products box show then?

  2. #12
    Join Date
    Sep 2010
    Posts
    64
    Plugin Contributions
    0

    Default Re: Featured Listing Not displaying on Product Listing Page

    Quote Originally Posted by lat9 View Post
    Hmm, what happens if you temporarily disable your URL rewriting plugin? Does the Featured Products box show then?
    Yep nothing changes

    I don't understand why new items are showing at the bottom? Why would they show up? The code is similar just relying on a different code .

  3. #13
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Featured Listing Not displaying on Product Listing Page

    Quote Originally Posted by cyberfolli View Post
    Yep nothing changes

    I don't understand why new items are showing at the bottom? Why would they show up? The code is similar just relying on a different code .
    OK, so lets take a look at the different code. Please post the contents of the file

    /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_featured_products.php

    Cheers
    RodG

  4. #14
    Join Date
    Sep 2010
    Posts
    64
    Plugin Contributions
    0

    Default Re: Featured Listing Not displaying on Product Listing Page

    [QUOTE=RodG;1290272]OK, so lets take a look at the different code. Please post the contents of the file

    /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_featured_products.php

    HTML Code:
    <?php
    /**
     * Module Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_modules_featured_products.php 2935 2006-02-01 11:12:40Z birdbrain $
     */
      $zc_show_featured = false;
      include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_FEATURED_PRODUCTS_MODULE));
    ?>
    
    <!-- bof: featured products  -->
    <?php 
    	$sum = 0;
    	for($row=0;$row<sizeof($list_box_contents);$row++) {
    		for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {		
    			if (isset($list_box_contents[$row][$col]['text'])) {
    			 $sum ++;
    			}    
    		}
    	}
    	
    	if ($zc_show_featured == true){
    		if ($sum > $homepage_options->fields['homepage_featured_products_hide_below']) { ?>
    			<div class="centerBoxWrapper" id="featuredProducts">
    				<?php
    				/**
    				 * require the list_box_content template to display the product
    				 */
    				  require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
    				?>
    			</div>
    <?php 
    		} 
    	}	
    ?>
    <!-- eof: featured products  -->

  5. #15
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Featured Listing Not displaying on Product Listing Page

    Sorry, but I think we need to dig a little deeper still.

    please post the contents of
    /includes/modules/YOUR_TEMPLATE/featured_products.php

    Thnks
    RodG

  6. #16
    Join Date
    Sep 2010
    Posts
    64
    Plugin Contributions
    0

    Default Re: Featured Listing Not displaying on Product Listing Page

    HTML Code:
    <?php
    /**
     * featured_products module - prepares content for display
     *
     * @package modules
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: featured_products.php 6424 2007-05-31 05:59:21Z ajeh $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die('Illegal Access');
    }
    
    // initialize vars
    $categories_products_id_list = '';
    $list_of_products = '';
    $featured_products_query = '';
    $display_limit = '';
    
    if ( (($manufacturers_id > 0 && $_GET['filter_id'] == 0) || $_GET['music_genre_id'] > 0 || $_GET['record_company_id'] > 0) || (!isset($new_products_category_id) || $new_products_category_id == '0') ) {
      $featured_products_query = "select distinct p.products_id, p.products_image, pd.products_name, p.master_categories_id
                               from (" . TABLE_PRODUCTS . " p
                               left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
                               left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                               where p.products_id = f.products_id
                               and p.products_id = pd.products_id
                               and p.products_status = 1 and f.status = 1
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
    } else {
      // get all products and cPaths in this subcat tree
      $productsInCategory = zen_get_categories_products_list( (($manufacturers_id > 0 && $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : $cPath), false, true, 0, $display_limit);
    
      if (is_array($productsInCategory) && sizeof($productsInCategory) > 0) {
        // build products-list string to insert into SQL query
        foreach($productsInCategory as $key => $value) {
          $list_of_products .= $key . ', ';
        }
        $list_of_products = substr($list_of_products, 0, -2); // remove trailing comma
        $featured_products_query = "select distinct p.products_id, p.products_image, pd.products_name, p.master_categories_id
                                    from (" . TABLE_PRODUCTS . " p
                                    left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
                                    left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id)
                                    where p.products_id = f.products_id
                                    and p.products_id = pd.products_id
                                    and p.products_status = 1 and f.status = 1
                                    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                                    and p.products_id in (" . $list_of_products . ")";
      }
    }
    if ($featured_products_query != '') $featured_products = $db->ExecuteRandomMulti($featured_products_query, MAX_DISPLAY_SEARCH_RESULTS_FEATURED);
    
    $row = 0;
    $col = 0;
    $list_box_contents = array();
    $title = '';
    
    $num_products_count = ($featured_products_query == '') ? 0 : $featured_products->RecordCount();
    
    // show only when 1 or more
    if ($num_products_count > 0) {
      switch (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS) {
        case 1: $col_width = 'col_12_of_12'; break;
        case 2: $col_width = 'col_1_of_2'; break;
        case 3: $col_width = 'col_1_of_3'; break;  
        case 4: $col_width = 'col_1_of_4'; break;  
        case 5: $col_width = 'col_1_of_5'; break; 
        case 6: $col_width = 'col_1_of_6'; break;
        case 7: $col_width = 'col_1_of_7'; break;
        case 8: $col_width = 'col_1_of_8'; break;  
        case 9: $col_width = 'col_1_of_9'; break;
        case 10: $col_width = 'col_1_of_10'; break;
            
        default: $col_width = 'col_12_of_12'; break;
      }
      
      $currentListingPage = "featuredProducts";
    
      while (!$featured_products->EOF) {
        $products_price = zen_get_products_display_price_mars($featured_products->fields['products_id']);
        if (!isset($productsInCategory[$featured_products->fields['products_id']])) $productsInCategory[$featured_products->fields['products_id']] = zen_get_generated_category_path_rev($featured_products->fields['master_categories_id']);
    
        $featured_product_carousel_class = ($homepage_options->fields['homepage_featured_products_display'] == 1) ? 'centerBoxContentsFeatured' : 'centerBoxContentsFeatured col '.$col_width;
    
        $link = '<a href="' . zen_href_link(FILENAME_PRODUCTS_ALL, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>&nbsp;';
        $buy_now_button = ($homepage_options->fields['homepage_featured_products_buy_now_button_display'] == 1) ? '<div class="buyNowCont">'.$link.'</div>' : '';
    
        // Effect 1
        if($homepage_options->fields['homepage_featured_products_hover_effect'] == 1){
          $list_box_contents[$row][$col] = array(
            'params' => 'class="'.$featured_product_carousel_class.'"',
            'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a class="listingProductLink" 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_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<h3 class="itemTitle"><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></h3><br /><span class="price">' . $products_price.'</span>'.$buy_now_button
          );
    
          $sliderEffect = 'featured_he_1';
        }
        
        // Effect 2
        if($homepage_options->fields['homepage_featured_products_hover_effect'] == 2){
          $list_box_contents[$row][$col] = array(
            'params' => 'class="'.$featured_product_carousel_class.'"',      
            'text' => '
              <div class="productStyle_2">
                ' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '
                <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']) . '">
                  <div class="info">
                    <h4>' . $featured_products->fields['products_name'] . '</h4>
                    <h6>' . $products_price.'</span></h6>
                  </div>
                </a>
              </div>          
            '      
          );
    
          $sliderEffect = 'featured_he_2';
        }
    
        // Effect 3
        if($homepage_options->fields['homepage_featured_products_hover_effect'] == 3){
          $list_box_contents[$row][$col] = array(
            'params' => 'class="'.$featured_product_carousel_class.'"',              
            'text' => '          
              <figure class="productStyle_3">
                ' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '
                <figcaption>
                  <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']) . '"><h4>' . $featured_products->fields['products_name'] . '</h4></a>
                  <h6>' . $products_price.'</h6>
                  <div class="button_cont">'.$buy_now_button.'</div>
                </figcaption>
              </figure>      
            '
          );
    
          $sliderEffect = 'featured_he_3';
        }
    
        // Effect 4
        if($homepage_options->fields['homepage_featured_products_hover_effect'] == 4){
          $list_box_contents[$row][$col] = array(
            'params' => 'class="'.$featured_product_carousel_class.'"',      
            'text' => '          
              <figure class="productStyle_4">
                <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_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a>
                <figcaption>
                  <h4><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></h4>
                  <h6>' . $products_price.'</h6>            
                </figcaption>
              </figure>            
            '
          );
    
          $sliderEffect = 'featured_he_4';
        }
    
        $col ++;
        if ($col > (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS - 1)) {
          $col = 0;
          $row ++;
        }
        $featured_products->MoveNextRandom();
      }
    
      if ($featured_products->RecordCount() > 0) {
        if (isset($new_products_category_id) && $new_products_category_id !=0) {
          $category_title = zen_get_categories_name((int)$new_products_category_id);
          $title = '<h2 class="centerBoxHeading">' . TABLE_HEADING_FEATURED_PRODUCTS . ($category_title != '' ? ' - ' . $category_title : '') . '</h2>';
        } else {
          $title = '<h2 class="centerBoxHeading">' . TABLE_HEADING_FEATURED_PRODUCTS . '</h2>';
        }
        $zc_show_featured = true;
      }
    }
    ?>

  7. #17
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Featured Listing Not displaying on Product Listing Page

    OK, so I think I *may* have identified the cause,but I've no easy way to prove/disprove it - So please humour me one this one.

    In the file /includes/modules/YOUR_TEMPLATE/featured_products.php

    Find the part of code that reads:

    Code:
        // Effect 1
        if($homepage_options->fields['homepage_featured_products_hover_effect'] == 1){
          $list_box_contents[$row][$col] = array(
            'params' => 'class="'.$featured_product_carousel_class.'"',
            'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a class="listingProductLink" 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_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<h3 class="itemTitle"><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></h3><br /><span class="price">' . $products_price.'</span>'.$buy_now_button
          );
    
          $sliderEffect = 'featured_he_1';
        }

    Then comment out the first and last lines, so it reads :

    Code:
        // Effect 1
     //   if($homepage_options->fields['homepage_featured_products_hover_effect'] == 1){
          $list_box_contents[$row][$col] = array(
            'params' => 'class="'.$featured_product_carousel_class.'"',
            'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a class="listingProductLink" 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_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<h3 class="itemTitle"><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></h3><br /><span class="price">' . $products_price.'</span>'.$buy_now_button
          );
    
          $sliderEffect = 'featured_he_1';
    //    }
    Save the file and then check to see if the featured products now display where you expect them to.

    NOTE: The output may look like crap and it'll probably also make a bit of a mess with the featured products on the home page. Don't worry about this at the moment - the modifications are simply to let me know if I/we are on the right track or not.

    Please report on the results/effects .

    Cheers
    RodG

  8. #18
    Join Date
    Sep 2010
    Posts
    64
    Plugin Contributions
    0

    Default Re: Featured Listing Not displaying on Product Listing Page

    I changed the code and nothing happened. Isn't it strange that the new products show up and the featured do not. Could the Database not be storing the data as a featured product ?

  9. #19
    Join Date
    Sep 2010
    Posts
    64
    Plugin Contributions
    0

    Default Re: Featured Listing Not displaying on Product Listing Page

    I also double checked the data in the database an there are two records there. i changed the dates to make sure they were featured today.

    Is there any other relational tables that data needs to be associated with?

  10. #20
    Join Date
    Sep 2010
    Posts
    64
    Plugin Contributions
    0

    Default Re: Featured Listing Not displaying on Product Listing Page

    Also the Specials are working fine. So the Code is functioning.

    http://www.aurumjewelers.net/penn-state-jewelry

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v139a Adding Product Rating on Featured Listing Page
    By gal_op in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 6 Oct 2012, 06:17 AM
  2. Category - Product listing - displaying Defined Page
    By WHOSYOURDADDY in forum Basic Configuration
    Replies: 1
    Last Post: 28 Oct 2009, 07:31 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