2 Replies Latest reply: Apr 18, 2014 1:36 PM by TimK RSS

    Can the refinements bin count be altered based on attributes.

    Rishab Srivastava

      I need to exclude the out of stock products from the bin count of the refinements. Is there a way in which endeca does not compute the count including out of stock products.

        • 1. Re: Can the refinements bin count be altered based on attributes.
          JeremyFryer

          I do not think there is anything configuration wise you can do. You will need to get the count for the dimension then add your own logic for going over child dimensions and subtracting any values.

          • 2. Re: Can the refinements bin count be altered based on attributes.
            TimK

            Agreed.

             

            You might consider running two queries.  First to get all products and refinements.  Second that has a filter set to remove Out of Stock products and from these results gather the bin counts.  This second query could be super slim for performance - 0 results, and perhaps asking for only the refinement counts for specified dimensions (available in the 6.4.x and possibly 6.3.x APIs).

             

            An alternative is to change the User Interaction model so you only show in stock products - thus no need for extra computation/queries.  And have a link or some UX component that allows the user to see out of stock products.  We often do something like this:

            Initial Query is for in stock products ONLY

            if no results returned, relax the query to say partial match

            if still no results, relax query to get out of stock products

            if results, display to the user something like - hey we don't have anything in stock that matches, but we here are some out of stock items...