Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > ecommerce: mark product fields to act as filter options View modes: 
User avatar
Member
Member
thanos.panousis-indice - 1/25/2013 8:01:37 AM
   
ecommerce: mark product fields to act as filter options
Kentico newbie here. Our client has many thousands of SKUs/products on his ecommerce catalog and hundreds of product types. In the kentico ecommerce example site, a product category page has a product filter webpart that helps customers find what they are looking for easily.

The current implementation of this webpart relies on product categories. This means that if a product manager creates 5 new product types with new fields etc, he would need to also create the relevant categories that would allow category-page filtering.

The ideal implementation could work like so: a user creates a new product type, adding all relevant fields to it, with values and form widgets for each one. A field could have a "is filter" property, that automatically "marks" this field to act as a filter on the category page. Then an apprioately developed webpart could auto-discover those fields, render their appropriate form control and values, and make the necessary post back to server.

This solution is better because it requires less administrative overhead plus it provides the site visitor with more options (dropdowns with values, checkboxes etc).

Could offer some advice on where to start looking in order to develop this?

Thanks.

User avatar
Member
Member
thanos.panousis-indice - 1/29/2013 10:45:46 AM
   
RE:ecommerce: mark product fields to act as filter options
I would really appreciate some guidance regarding this issue. If my requirement is not clear, I can provide further information.

Could you post some further pointers?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/29/2013 10:08:04 PM
   
RE:ecommerce: mark product fields to act as filter options
You could create an custom filter (ascx control that inherits CMSAbstractQueryFilterControl) and place a Filter webpart on the page specifying the path to your newly created custom filter and then place a Products Datasource webpart on the page and set the Filter property = the filter webpart name you just placed on the page. The filter you create (.ascx) can have lookups from anywhere you'd like that populate any kind of control you'd like. All the filter is doing is creating the Where, Select, Sort By etc. statements. When you have created those you simply call this.RaiseOnFilterChanged() and the info will be passed to the datasource webpart which then populates the viewer control you have on the page.

So as you mention, you could have an "IsFilter" propety and your custom filter you create will get all those fields and display them as filter options for you.

User avatar
Member
Member
thanos.panousis-indice - 1/30/2013 2:07:40 AM
   
RE:ecommerce: mark product fields to act as filter options
Where do you think the filter information for each content type's fields will be managed? Should it be a custom table that is managed outside the content type's settings, or is there a chance to integrate this form directly on the ct page?

Your advice is very appreciated.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 2/1/2013 11:59:29 AM
   
RE:ecommerce: mark product fields to act as filter options
Hi,

Just FYI, the custom filter development is comprehensively described e.g. at Custom filter development blogpost.

The custom table to store filter information for each product document type is one possible solution. Storing the information directly in the document type definition (if we're talking about Site manager -> Development-> Document types -> Fields editor) would probably require modification of system classes and the Form engine code, so the custom table seems to be more feasible way.

Regards,
Zdenek