Results 1 to 6 of 6
  1. #1
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default sub-categories product count management

    Hi,

    I'm using v1.38.

    I set the styling of my sub-categories to display: block;
    But this causes the count of the products to go to the next line, is there a way to have it near the sub-category?

    www.editricebahai.com/negozio_online

    Thank you.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: sub-categories product count management

    You would need to modify tpl_categories.php to move the count inside the link instead of after it. Categories Dressing has already done this, so you could use it, or study its code to see how it was done if you want to recode for yourself.

  3. #3
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default Re: sub-categories product count management

    Thanks.

    I tried, but most probably I didn't do it right, as the count disappeared.

    Could you please point me more precisely?
    And what is categories dressing?

    I did it like this:

    PHP Code:
          if ($box_categories_array[$i]['has_sub_cat']) {
            
    $content .= CATEGORIES_SEPARATOR;
            if (
    SHOW_COUNTS == 'true') {
            if ((
    CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
              
    $content .= CATEGORIES_COUNT_PREFIX $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
            }
          }
          }
          
    $content .= '</a>';

          
    //if (SHOW_COUNTS == 'true') {
            //if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
              //$content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
            //}
          //} 
    is that what I was supposed to do?

  4. #4
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default Re: sub-categories product count management

    I found Categories Dressing.
    Meanwhile if you could please explain the coding anyway, I'd appreciate.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: sub-categories product count management

    Without going back and looking at the original file, your adjustment looks right. Not sure what happened, and am packing for a trip so don't have time to get into it for a couple of weeks.

  6. #6
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default Re: sub-categories product count management

    Ok, thanks, have a good trip.

    I'll play around with it , in case I'll post an update request.

 

 

Similar Threads

  1. Show sub-sub categories underneath sub-categories on the category page?
    By tomrice in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Jun 2009, 03:05 AM
  2. how can i remove the product count in categories
    By steveAR in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 12 Sep 2008, 08:58 AM
  3. move Sub Categories Count
    By wmorris in forum General Questions
    Replies: 22
    Last Post: 29 Mar 2008, 02:57 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