ProductDataSource Sort Order

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
dc8johnson
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 87
Joined: Fri Nov 20, 2009 8:46 am

ProductDataSource Sort Order

Post by dc8johnson » Mon Jan 04, 2010 1:16 pm

Is there a ProductDataSource method that will return the product from a category in the admin-sorted order? I've tried this:

ProductsRepeater.DataSource = ProductDataSource.NarrowSearch(string.Empty, child.CategoryId, 0, 0, 0, 0, 0, "OrderBy ASC");

but it doesn't work - although it does not error. The order is not by ProductName or ProductID. I tried the same sort expression in the ProductDataSource.FindProducts method and it generated an error saying OrderBy was an invalid column.

Thanks,
David Johnson

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: ProductDataSource Sort Order

Post by mazhar » Tue Jan 05, 2010 4:43 am

Have a look at category details control in ConLib and make use of that code for loading products within a category.

Post Reply