Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32
  1. #11
    Join Date
    Aug 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: Hide category count -- on only ONE category

    Tried this:
    Code:
    if (SHOW_COUNTS == 'true' and ($this_is_home_page)) {
          $products_in_category = zen_count_products_in_category($counter);
          if ($products_in_category > 0) {
            $this->box_categories_array[$ii]['count'] = $products_in_category;
          } else {
            $this->box_categories_array[$ii]['count'] = 0;
          }
        }
    And I tried this:
    Tried this:
    Code:
    if (SHOW_COUNTS == 'true' and $this_is_home_page !=true) {
          $products_in_category = zen_count_products_in_category($counter);
          if ($products_in_category > 0) {
            $this->box_categories_array[$ii]['count'] = $products_in_category;
          } else {
            $this->box_categories_array[$ii]['count'] = 0;
          }
        }
    I also tried and $this_is_home_page == false

    But nothing seems to work right. I'm not sure whether I need to compare "$this_is_home_page" to some global variable/ or what...

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

    Default Re: Hide category count -- on only ONE category

    Say in english, and type really slow as I do not read very fast, what it is you want to do ...
    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: v1.5.5]
    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. #13
    Join Date
    Aug 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: Hide category count -- on only ONE category

    Acceptable Scenario:
    I was trying to achieve this: category counts DON'T appear on the home page, but category counts appear on all other pages

    What DONTKNOWWHATIMDOING (<--me!) Was Trying to Do (What an Appropriate name!)
    =>IF the page I am on is the home page, no category counts appear
    =>If the page I am on is NOT the home page, show the category counts

    It would be even better if I could somehow only have category counts appearing on pages showing at least 1 category level deep.

    I wouldn't bother with the 'even better' scenario unless there was a simple way to do it.
    Last edited by dontknowwhatimdoing; 11 Aug 2008 at 04:14 AM.

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

    Default Re: Hide category count -- on only ONE category

    You will want to use your templates and overrides for this ... I like to copy both peices even if I am only editing one of the files for consistancy:
    /includes/modules/sideboxes/categories.php
    /includes/templates/templates_default/sideboxes/tpl_categories.php

    Copy to your overrides directory:
    /includes/modules/sideboxes/your_template_dir/categories.php
    /includes/templates/your_template_dir/sideboxes/tpl_categories.php

    Edit the file:
    /includes/templates/your_template_dir/sideboxes/tpl_categories.php

    Line 51 reads:
    PHP Code:
          if (SHOW_COUNTS == 'true') { 
    Change to read:
    PHP Code:
          if (SHOW_COUNTS == 'true' && !$this_is_home_page) { 
    Now you see the counts when not on the Home page ...
    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: v1.5.5]
    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!

  5. #15
    Join Date
    Aug 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: Hide category count -- on only ONE category

    It worked flawlessly (of course--you wrote it)

    Thank you so much! You're a pro <= Sorry for telling you something you already know!

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

    Default Re: Hide category count -- on only ONE category

    Heck ... I just type really really fast until the right letters fall together ... there are only so many combos and eventually I will hit it ...
    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: v1.5.5]
    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!

  7. #17
    Join Date
    Aug 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: Hide category count -- on only ONE category

    Hello,

    I am trying to find out how to turn off the category count for my products, Just the number that shows next to each product in the category box on the main page. I have set all quanity counts to (zero), But i must be missing one.

    I know there is a way to do this without having to do code, Just using the configuration some were?

    Thanks alot!

  8. #18
    Join Date
    Aug 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: Hide category count -- on only ONE category

    Quote Originally Posted by Keith.S View Post
    Hello,

    I am trying to find out how to turn off the category count for my products, Just the number that shows next to each product in the category box on the main page. I have set all quanity counts to (zero), But i must be missing one.

    I know there is a way to do this without having to do code, Just using the configuration some were?

    Thanks alot!
    Admin > Configuration > my store

    Show Category Counts = False

  9. #19
    Join Date
    Mar 2006
    Posts
    477
    Plugin Contributions
    0

    Default Re: Hide category count -- on only ONE category

    How about doing this same thing but i only want to show the quanity in one category for our clearance section only
    We sell ATV, Dirtbike, Streetbike, Snowmobile, Watercraft & Custom stickers & Banners. Check us out www.AD-DiscountPerformance.com

  10. #20
    Join Date
    Aug 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: Hide category count -- on only ONE category

    Quote Originally Posted by Dashizna View Post
    How about doing this same thing but i only want to show the quanity in one category for our clearance section only
    The only way I personally would know how to do this would be with a PHP conditional statement --

    I don't know if that can be done without altering the core code (i.e. I don't think there's a simple box you can check to do that).

    There's some posts about exactly what you're asking, I can't recall where they are though, so I don't have a link for you.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v151 Hide one category from category side box
    By robbie269 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 18 Feb 2014, 03:35 PM
  2. ADD TO CART on Category Listing in One Category only
    By ald0413 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 31 Jan 2011, 07:05 PM
  3. Hide or Password Protect only one Category?
    By Boggled in forum Setting Up Categories, Products, Attributes
    Replies: 25
    Last Post: 1 Sep 2008, 12:42 PM
  4. Hide Price for only one category
    By microinfo in forum General Questions
    Replies: 2
    Last Post: 26 Jun 2008, 11:13 AM
  5. Only one product type in list; only in one category. Why?
    By whitefael in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 7 Jan 2007, 06:13 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