Developer forum

Forum » Ecommerce - Standard features » Facet options from products not placed in a group (Warehouse)

Facet options from products not placed in a group (Warehouse)

Kim Søjborg Pedersen
Reply

Hi, how can I prevent facet options from products in warehouse (or products not in a group) to appear in the facets lists? Even when the "Show facet options with no results" is checked

I have a filter on the field CustomProductFieldColor and I dont want the Blue color to appear in my color facets.

Product 1 - CustomProductFieldColor = Red
Product 2 - CustomProductFieldColor = Yellow
Product 3 - CustomProductFieldColor = Blue (In warehouse and not placed in a group yet)

Regards
Kim


Replies

 
Nicolai Pedersen
Reply

You can set the active state on the products not ready, or you can try changing the search to not list products in a group, see dumps

Capture.PNG Capture1.PNG
 
Kim Søjborg Pedersen
Reply

I don't have the isEmpty option, and what I need is an isNotEmpty, because only products in a group should be in the index.

DW 9.3.1

 
Kim Søjborg Pedersen
Reply

Hi Nicolai, I still looking for a solution on this.

Here is a little more about the setup:

When the integration runs all the products from inRiver is placed in the DW eCommerce without any groups relations. The products is now displayed in the PIM warehouse and waiting to be published to the ecom. The problem is that data from products in the warehouse is taken and used in the facet options in the frontend. 

What do you think about this, Solution : DW don't take data from products in the warehouse and use them in facets options, or maybe don't add them to the index.

Regards
Kim

 

 

 
Nicolai Pedersen
Reply

Hi Kim

The facets are based on your query, so you have to make sure that query only publishes data that is ready for it.

You also have a Shop id on the products and you can use the macro for the shop context. See dump - that is how it is usually done. If that does not work, my guess is that you have something in your data that is not right.

Capture.PNG
 
Kim Søjborg Pedersen
Reply

Hi Nicolai

Hope your right because then i can fix it :)

I already use the context:shopid (see dump) but with contains. If I use the "In" for the string Array I get this error. And I don't have the isEmpty option for System.String[]

System.NotSupportedException: The type for the given value is not supported by the 'In' operator. The supported type is 'System.Array'. Current: 'System.String'.
   at Dynamicweb.Indexing.Lucene.Helpers.ThrowTypeNotSupported(OperatorType operatorType, Type supportedType, Type currentType)
   at Dynamicweb.Indexing.Lucene.Helpers.ParseQueryExpressionInternal(IIndex index, Expression expression, Analyzer analyzer, QuerySettings settings)
   at Dynamicweb.Indexing.Lucene.Helpers.ParseQueryExpressionInternal(IIndex index, Expression expression, Analyzer analyzer, QuerySettings settings)
   at Dynamicweb.Indexing.Lucene.Helpers.ParseQueryExpression(IIndex index, Expression expression, QuerySettings settings)
   at Dynamicweb.Indexing.Lucene.LuceneIndexProvider.SearchInternal(IQuery query, QuerySettings settings)
   at Dynamicweb.Indexing.Lucene.LuceneIndexProvider.Query(IQuery query, QuerySettings settings)
   at Dynamicweb.Indexing.Queries.IndexQueryProvider.Query(IQuery query, QuerySettings settings)
   at Dynamicweb.Indexing.Querying.QueryService.Query(IQuery query, QuerySettings settings)
   at Dynamicweb.Ecommerce.Frontend.Frontend.GetProductsFromIndexQuery()

2017-11-09_1227.png
 
Kim Søjborg Pedersen
Reply

I just tryed with 9.3.6 but its the same

Untitled.png
 
Kim Søjborg Pedersen
Reply

Tryed at new solution (9.3.4) picking "in" on a string array gives this

System.NotSupportedException: The type for the given value is not supported by the 'In' operator. The supported type is 'System.Array'. Current: 'System.String'. at Dynamicweb.Indexing.Lucene.Helpers.ThrowTypeNotSupported(OperatorType operatorType, Type supportedType, Type currentType) at Dynamicweb.Indexing.Lucene.Helpers.ParseQueryExpressionInternal(IIndex index, Expression expression, Analyzer analyzer, QuerySettings settings) at Dynamicweb.Indexing.Lucene.Helpers.ParseQueryExpressionInternal(IIndex index, Expression expression, Analyzer analyzer, QuerySettings settings) at Dynamicweb.Indexing.Lucene.Helpers.ParseQueryExpression(IIndex index, Expression expression, QuerySettings settings) at Dynamicweb.Indexing.Lucene.LuceneIndexProvider.SearchInternal(IQuery query, QuerySettings settings) at Dynamicweb.Ecommerce.Frontend.Frontend.GetProductsFromIndexQuery()

2017-11-09_1655.png
 
Nicolai Pedersen
Reply

Hi Kim

Sorry for the late response. Match any should work.

BR Nicolai

Capture.PNG

 

You must be logged in to post in the forum