• Share
  • ?
  • Profiles ▼
  • Communities ▼
  • Apps ▼

Blogs

  • My Blogs
  • Public Blogs
  • My Updates
  • Administration
  • Log in to participate

▼ Tags

 

▼ Similar Entries

Setting Up Index Hea...

Blog: CSE-WebSphere...
Jamie Dishy 50A21QFQ93
Updated
0 people like thisLikes 0
CommentsComments 1

Try the new scoped s...

Blog: C/C++ compile...
FangLu 2700058AGP
Updated
0 people like thisLikes 0
No CommentsComments 0

Optimizing Search In...

Blog: CSE-WebSphere...
Eric-Scott 270006G0Q2
Updated
0 people like thisLikes 0
No CommentsComments 0

Customizing: Adding ...

Blog: CSE-WebSphere...
Mahhum_Mobashir 270006P4NK
Updated
0 people like thisLikes 0
No CommentsComments 0

Support Search delta...

Blog: Websphere Com...
Jacky Yan 50JTYSWH2S
Updated
0 people like thisLikes 0
No CommentsComments 0

▼ Archive

  • March 2015
  • February 2015
  • January 2015
  • November 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • January 2014
  • November 2013
  • September 2013
  • July 2013
  • May 2013
  • April 2013

▼ Blog Authors

WebSphere Commerce Search Cookbook

View All Entries
Clicking the button causes a full page refresh. The user could go to the "Entry list" region to view the new content.) Entry list

Unpublished Items included in Storefront Facet Count

Brendon Baila 2700006C87 | | Tags:  search facets preprocess ‎ | 5,840 Views

If you use the 'display to customers' flag in management center to unpublish select SKUs, you may have noticed that the facet count on the storefront is still tallying these unpublished items. For example:

1. Create a product: 'Shirt'

2. Assign it an attribute 'Colour' (and make this attribute facetable)

3. Create a couple of items for the product, with attribute values 'Red', 'Blue', 'Green'.

4. For the shirt SKU of color 'Blue', uncheck 'display to customers'

5. Run Preprocess/buildindex

6. On the storefront, search for 'shirt'. On the left nav, you'll see all size attributes appear, including 'Blue', which only belongs to the unpublished SKU

7. Click on the 'blue' facet. 0 products/SKUs are returned.

This can be frustrating for shoppers, who think that a blue shirt is available, but then can't actually display the product.

 

You can change this behaviour by updating a di-preprocess XML. Locate the file wc-dataimport-preprocess-attribute.xml for the CatalogEntry index you want to change, for example:

<CommerceServer70 install dir>/instances/<instance name>/search/pre-processConfig/MC_10001/DB2/wc-dataimport-preprocess-attribute.xml

Make the following change in red to the SQL section:

(select catentryattr.catentry_id , attrvaldesc.attr_id attr_id, attrvaldesc.stringvalue attr_stringvalue, attrvaldesc.integervalue attr_integervalue, attrvaldesc.floatvalue attr_floatvalue, af.attrtype_id attrtype_id, af.srchfieldname attr_name from catentryattr,attrvaldesc, TI_CATENTRY_4 CE, attrdictsrchconf af
where catentryattr.catentry_id=CE.catentry_id and catentryattr.attr_id in (?attr_id?) and attrvaldesc.attrval_id=catentryattr.attrval_id and attrvaldesc.language_id=?language_id? and af.attr_id=attrvaldesc.attr_id)
UNION
(select c.catentry_id_parent CATENTRY_ID, attrvaldesc.attr_id attr_id, attrvaldesc.stringvalue attr_stringvalue, attrvaldesc.integervalue attr_integervalue, attrvaldesc.floatvalue attr_floatvalue, af.attrtype_id attrtype_id, af.srchfieldname attr_name
                from catentryattr,attrvaldesc, TI_CATENTREL_4 c, attrdictsrchconf af, catentdesc cd
                where c.catentry_id_child=catentryattr.catentry_id and cd.catentry_id = c.catentry_id_child and cd.language_id = ?language_id? and cd.published = 1 and
                                attrvaldesc.attrval_id=catentryattr.attrval_id and attrvaldesc.language_id=?language_id? and
                                af.attr_id=attrvaldesc.attr_id and
                                catentryattr.attr_id in (?attr_id?))
order by catentry_id, attrtype_id
 

Then run preprocess and buildindex

  • Add a Comment Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry
Notify Other People
notification

Send Email Notification

+

Quarantine this entry

deleteEntry
duplicateEntry

Mark as Duplicate

  • Previous Entry
  • Main
  • Next Entry
Feed for Blog Entries | Feed for Blog Comments | Feed for Comments for this Entry