Sort Featured Product List

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Zacuto
Ensign (ENS)
Ensign (ENS)
Posts: 1
Joined: Fri Jan 08, 2010 2:03 pm

Sort Featured Product List

Post by Zacuto » Fri Jan 08, 2010 2:13 pm

I am setting up our Ablecommerce 7.0.4 cart for the first time as I am migrating us off Xcart and went to sort the Featured Products list but there doesn't seem to be a way to do it. Am I missing something? I tried under the Marketing -> Featured Products menu but you can only add them. If i wanted to change the order do I need to remove them all then add them again in the order I want?

Thanks,
Dave

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

Re: Sort Featured Product List

Post by mazhar » Mon Jan 11, 2010 5:43 am

Give a try edit your ConLib/FeaturedProductsGrid.ascx.cs file and locate following code line

Code: Select all

ProductList.DataSource = ProductDataSource.GetRandomFeaturedProducts(0, true,IncludeOutOfStockItems, this.Size);
and the update it as below

Code: Select all

//ProductList.DataSource = ProductDataSource.GetRandomFeaturedProducts(0, true,IncludeOutOfStockItems, this.Size);
ProductList.DataSource = ProductDataSource.GetFeaturedProducts(0, true, IncludeOutOfStockItems, "Name");
This will list featured products in alphabetical ascending order. If you want it in descending order then simply update "Name" to "Name DESC". Finally if you want to pick products based on system adjusted order simply replace "Name" with "".

Post Reply