on 07-03-2014 3:37 PM
We want to enable sorting on supercategories of a product. We added this to the base_product.xml
<sort-properties>
<property qualifier="Item.modifiedtime"/>
<property qualifier="Product.code"/>
<property qualifier="Product.name"/>
<property qualifier="Product.description"/>
<property qualifier="Item.pk"/>
<property qualifier="Product.supercategories"/>
</sort-properties>
And this is visible in the productcockpit
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
Actually this isn't possible. It's a bug that it makes collection attributes available for sort optins in the first place.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.