Working with ShopBy in code
Posted: Wed Feb 25, 2015 4:52 am
I spent some time this morning adapting the ShopBy mechanism directly into a custom category page. The site design doesn't permit the usual CategorySearchSidebar implementation, so I had some work cut out for me.
Overall it worked very nicely. You guys did a great job on it in my opinion. The code was organized and simple to work with in the UI layer.
My only remaining question has to do with the implementation of ShopBy filtering via ProductDataSource.AdvancedSearch() versus CatalogNodeDataSource.
In the past, it's been my practice to work with CatalogNodeDataSource to retrieve products when those products are going to be rendered. This is because only CatalogNodeDataSource returns the result set in the order specified in the admin. I specifically avoid using ProductDataSource for this reason.
My question is: Do ShopBy results via ProductDataSource.AdvancedSearch() return in Admin order by default? And is this going to create issues down-the-road as more people implement it for the purposes of rendering products and realize their admin sort order is no longer being respected?
Thoughts?
Overall it worked very nicely. You guys did a great job on it in my opinion. The code was organized and simple to work with in the UI layer.
My only remaining question has to do with the implementation of ShopBy filtering via ProductDataSource.AdvancedSearch() versus CatalogNodeDataSource.
In the past, it's been my practice to work with CatalogNodeDataSource to retrieve products when those products are going to be rendered. This is because only CatalogNodeDataSource returns the result set in the order specified in the admin. I specifically avoid using ProductDataSource for this reason.
My question is: Do ShopBy results via ProductDataSource.AdvancedSearch() return in Admin order by default? And is this going to create issues down-the-road as more people implement it for the purposes of rendering products and realize their admin sort order is no longer being respected?
Thoughts?