Announcement

Collapse
No announcement yet.

Count Products in Category

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Count Products in Category

    Hi,

    Is there a way I can count the products in a specific category then use that count to display?

    For example, with the count I want to display one product from the category and then add a text link under it "View All 35 Products - Click Here". I thought I saw that as a function in toolkit but for the life of me can't find it now that I wanted to use it.

    Thanks,
    Mike

    #2
    Re: Count Products in Category

    Look in the Toolkit admin "Utilities > Emporium Plus tool kit"

    The function uses a category custom field called Category Count. IIRC, that is done automatically.

    #85 here:

    http://www.emporiumplus.com/1AA00223.html

    Discusses it some, in that it does create the custom field, etc.
    Last edited by nottheusual1; 09-24-14, 12:09 PM.

    Comment


      #3
      Re: Count Products in Category

      It discusses it some, to the point I'm confused by the sentence "It remains static until you run it again." Run what again? The "Products in Category Count" in the Toolkit admin (Utilities > Emporium Plus Tool Kit > Products in Category Count). If it's not dynamic, can it be run by a cron job?

      Leslie
      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

      Comment


        #4
        Re: Count Products in Category

        Yes on the first part - you have to tell it to run the count again. And Bill will need to answer the second part.

        Comment


          #5
          Re: Count Products in Category

          You can run just about anything in miva admin with a cron job.
          Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
          Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
          Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
          Facebook http://www.facebook.com/EmporiumPlus
          Twitter http://twitter.com/emporiumplus

          Comment


            #6
            Re: Count Products in Category

            Okay - while it will handle itself in the background once it's set up, it's kind of frustrating to have to do this. Guess somethings aren't as smart as I give them credit for (as in Miva Merchant should know how many products are in the store and in which categories at any given time).

            Thanks ya'll
            Leslie Kirk
            Miva Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

            Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

            Comment


              #7
              Re: Count Products in Category

              l.settings:category_product_count / &mvt:category_product_count; doesn't provide the count?

              Also, you can use the "css nth child selector" trick (http://www.w3schools.com/cssref/sel_nth-child.asp) to do what you want as well. Leslie might remember what topic it was that had more details on this type of method.
              Bruce Golub
              Phosphor Media - "Your Success is our Business"

              Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
              phosphormedia.com

              Comment


                #8
                Re: Count Products in Category

                Originally posted by Bruce - PhosphorMedia View Post
                l.settings:category_product_count / &mvt:category_product_count; doesn't provide the count?

                &mvt:category_product_count; doesn't but &mvt:product_list:total_prod_count; seems to. The numbers are off a bit from what the Toolkit function is pulling in. But only by a couple of items.

                I'd have to dig through what I had before I switched to something that I could control my window with. The nth thing wasn't quite doing everything I needed.
                Leslie Kirk
                Miva Certified Developer
                Miva Merchant Specialist since 1997
                Previously of Webs Your Way
                (aka Leslie Nord leslienord)

                Email me: [email protected]
                www.lesliekirk.com

                Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                Comment

                Working...
                X