Page 1 of 1

search by variant on categorygridpage

Posted: Wed Oct 12, 2011 3:18 pm
by Tea-Dev
Before posting, I searched the forums, I couldn't find any reference to this particular issue
we are building a new filtering system which will filter based on variants on the "category grid page"

The current code uses NarrowSearch:

Code: Select all

ProductList.DataSource = ProductDataSource.NarrowSearch(_Keywords, this.CategoryId, _ManufacturerId, 0, 0, _PageSize, (_HiddenPageIndex * _PageSize), SortResults.SelectedValue);
Is it possible to modify this code to search the same way it does now (for keywords category and manufacturer id, low and high prices like NarrowSearch does) and add also search by variant option?

I tried using LoadForCriteria but LoadForCriteria does not perform the same way as NarrowSearch, for example the sorting is different and LoadForCriteria does not support an ORDERBY as a sortExpression.

Best Regards
Ofir
http://www.tea-corp.com
Tea-Developer

Re: search by variant on categorygridpage

Posted: Wed Oct 12, 2011 6:59 pm
by Logan Rhodehamel
It can be modified but that requires access to our source code.

Another approach that can be done without source access would be to duplicate the functionality of the NarrowSearch in your own code and then call it in place of our method. Many people who have source access even follow this kind of approach because it keeps you from having a customized version of the CommerceBuilder.dll file.

I don't know of any other options for adding a new parameter.

Re: search by variant on categorygridpage

Posted: Thu Oct 13, 2011 7:39 am
by jmestep
I had to do one for a merchant and started with their old cfm custom code as a basis and it took a long time to do. I went will all custom sql because of the many requirements they had.
http://www.martyshoes.com/Browse.aspx?c=2
I had done one a while ago using a modification of Able's search sidebar and data in a separate table. It isn't as full-featured as the one on the shoe site because they didn't require it, but it can be done. That was using a custom datasource also.