Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Help removing descriptions from Featured Items appearing on main page

Help removing descriptions from Featured Items appearing on main page

Locked

Views: 898

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
1 Aug 2010, 5:53 PM
#1
shiftypow avatar

shiftypow

Zen Follower

Join Date:
Jan 2006
Posts:
120
Plugin Contributions:
0

Help removing descriptions from Featured Items appearing on main page

Hi, I have just installed a new template to our site,

w w w . a s h c y c l e s . c o m / s i t e

and as you can see on the main page where I have the featured items it has the title of the product and then the description right on it. Can someone please tell me how i would go about disabling it. I thought in the admin area i would have to do configuration -> featured listing -> display product description but when i put this at zero nothing happens :/ am i an idiot? Thanks in advance for any help.

1 Aug 2010, 7:06 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Help removing descriptions from Featured Items appearing on main page

The admin function you described controls the listing you see when you click on Featured Products in the Categories sidebox, not the Featured Products listing on other pages.

Sadly, our friends at Template Monster have decided that the description in that listing is a good idea and the price they've decided you should pay for the privlege of paying $160 for a template that doesn't do what you want it to.

You could use the Developers Tool Kit to search for 'indent2' to see how they've done that, with the possibility of switching it off.
**
https://www.zen-cart.com/tutorials/index.php?article=38
https://www.zen-cart.com/tutorials/index.php?article=39**

1 Aug 2010, 7:58 PM
#3
shiftypow avatar

shiftypow

Zen Follower

Join Date:
Jan 2006
Posts:
120
Plugin Contributions:
0

Re: Help removing descriptions from Featured Items appearing on main page

The code i got while searching was this :

<?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, pd.products_description 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, pd.products_description 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) { if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS == 0) { $col_width = floor(100/$num_products_count); } else { $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS); } while (!$featured_products->EOF) { 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']); $products_img = (($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_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a>'); $products_name = '<a class="name" 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>'; $products_desc = substr(strip_tags($featured_products->fields['products_description']), 0, 50) . '...'; $products_price = '<strong>' . zen_get_products_display_price($featured_products->fields['products_id']) . '</strong>'; $products_######## = '<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_button(BUTTON_IMAGE_GOTO_PROD_DETAILS, BUTTON_GOTO_PROD_DETAILS_ALT) . '</a>'; $img_col_w = IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH + 17; if (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS > 1 && $num_products_count > 1) { if ($col > 0 && $col < SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS) { $tm_param = 'style="margin:0 0 0 10px;"'; } else { $tm_param = ''; } $list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent back ie_margin"' . ' ' . 'style="width:' . $col_width . '%;"', 'text' => '<div class="product-col" ' . $tm_param . '> <div class="tie"> <div class="left-top"> <div class="right-top"> <div class="left-bot"> <div class="right-bot"> <div class="indent1"> <div class="img"> <span class="image">' . $products_img . '</span> </div> <div class="indent2"> '.$products_desc.' <div class="price">' . $products_price . '</div> </div> <div class="button">' . $products_######## . '</div> </div> </div> </div> </div> </div> </div> <div class="clear"></div> </div>' ); } else { $list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"', 'text' => '<div class="product-col" ' . $tm_param . '> <div class="tie"> <div class="left-top"> <div class="right-top"> <div class="left-bot"> <div class="right-bot"> <div class="indent1"> <div class="img"> <span class="image">' . $products_img . '</span> </div> <div class="indent2"> '.$products_desc.' <div class="price">' . $products_price . '</div> </div> <div class="button">' . $products_######## . '</div> </div> </div> </div> </div> </div> </div> <div class="clear"></div> </div>' ); } $col ++; if ($col > (SHOW_PRODUCT_INFO_COLUMNS_FEATURED_PRODUCTS - 1)) { $col = 0; $row ++; } $featured_products->MoveNextRandom(); } if ($featured_products->RecordCount() > 0) { // DO NOT DISPLAY HEADING AT HOME PAGE //if (!$this_is_home_page) { // ----------------------------------- 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> '; } // DO NOT DISPLAY HEADING AT HOME PAGE //} // ----------------------------------- $zc_show_featured = true; } } ?>

I tried a few things but im not very gd at coding so it came to no shock i couldnt get it to change, all i could get it to do was get both the product title and description to go.

1 Aug 2010, 8:08 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,611
Plugin Contributions:
0

Re: Help removing descriptions from Featured Items appearing on main page

You really need to contact the template designer.