Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Location
    Nelson, NZ
    Posts
    26
    Plugin Contributions
    0

    Default Category description display on first page only

    Hi

    Is there a way to show the category description only on the first page of any product list?

    ie on page 2,3 etc it does not display but on page 1 it does?

    Thanks

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

    Default Re: Category description display on first page only

    You could customize the products_listing.php module with something like:
    Code:
            $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3>' . ($_GET['page'] <= 1 ? '<div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) : '') . '</div>';
    NOTE: you should use your templates and overrides for this change ...
    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. #3
    Join Date
    Oct 2009
    Location
    Nelson, NZ
    Posts
    26
    Plugin Contributions
    0

    Default Re: Category description display on first page only

    Hi thanks for that,

    it was almost what I was looking for I didnt modify the products_listing.php but the tpl_index_product_list.php.

    Code:
    <?php
    // categories_description
        if (($current_categories_description != '') & ( $_GET['page'] <= 1 )) {
    ?>
    <div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description;  ?></div>
    <?php } 
    // categories_description 
    ?>
    Thanks for pointing me in the right direction

 

 

Similar Threads

  1. Showing category descripton only on the first page.
    By mrcastle in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 24 Jun 2015, 01:39 AM
  2. v150 categories image and description on first page only
    By tandbparties in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Nov 2012, 08:37 PM
  3. How to only show category description on first resutlts page?
    By ricardovangwan in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 23 Oct 2008, 10:26 AM
  4. Display sub category (first tier only)
    By chcholman in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 15 Feb 2008, 03:01 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