Skip to Content
Former Member
Jul 03, 2014 at 02:37 PM

Sorting on a collection in the productcockpit


We want to enable sorting on supercategories of a product. We added this to the base_product.xml

             <property qualifier="Item.modifiedtime"/>
             <property qualifier="Product.code"/>
             <property qualifier=""/>
             <property qualifier="Product.description"/>
             <property qualifier=""/>
          <property qualifier="Product.supercategories"/>

And this is visible in the productcockpit alt text

But the search is not working

 [Flexiblesearch error: cannot search unknown field 'TableField(name='supercategories',langPK='null',type=Product)' within type Product 
 SELECT {item:PK} FROM {Product AS item } WHERE  ( NOT EXISTS ({{ SELECT {CollElem:PK} FROM {ObjectCollectionItemReference AS CollElem
 } WHERE  ({CollElem:item} = {item:pk} AND {CollElem:collection} = ?gs.param.1 ) }}) AND  ({item:catalogVersion} IN (?gs.param.3,?gs.param.4,?gs.param.5,?gs.param.6,?gs.param.7) OR
 {item:PK} IN ({{ SELECT {CategoryProductRelation:target} FROM {CategoryProductRelation AS CategoryProductRelation  JOIN Category AS cat  ON {CategoryProductRelation:source} = {cat:PK} } WHERE {cat:catalogVersion} IN (?gs.param.8,?gs.param.9,?gs.param.10,?gs.param.11,?gs.param.12) }}) ) AND {item:itemtype} IN (?gs.param.13,?gs.param.14,?gs.param.15) ) ORDER BY {item:supercategories} DESC'][2]

Are we missing something?

[2]: /storage/temp/470-stacktrace.txt


470-stacktrace.txt (51.3 kB)