Page 1 of 1
How to create Alternate Featured Item section on home page?
Posted: Sun Jul 19, 2009 9:41 pm
by ZLA
We have two sections on our home page: Best Sellers and What's New. Best Sellers is based on Top Products while What's New is based on featured products. However, my client may want to pick and choose the exact products listed in the Best Sellers rather than basing it on sales.
Would the following approach work?
- Assign the desired best seller products to a hidden (or private?) category. They would still be assigned to their normal public categories as well.
- Replace the data source for the Best Sellers section with one that selects products from a specific category. (suggestions?)
Will the data source pull products from a hidden category?
Is there a better way to do this than what I envisioned?
Thanks in advance.
Re: How to create Alternate Featured Item section on home page?
Posted: Mon Jul 20, 2009 3:10 am
by mazhar
If What's new section will contain exactly the same products as top products then what about using two instances of PopularProductsDialog with different captions.
Code: Select all
[[ConLib:PopularProductsDialog Orientation="HORIZONTAL" Columns="3"]]
[[ConLib:PopularProductsDialog Orientation="HORIZONTAL" Caption="What's new" Columns="3"]]
Also here is a post about shuffling the top products
viewtopic.php?f=42&t=11593
Making use of this mod may show different products from top products for two different instances.
Re: How to create Alternate Featured Item section on home page?
Posted: Mon Jul 20, 2009 5:39 am
by ZLA
I'm sorry, I wasn't clear. The two sections will contain different products. One will be one set of featured products and the other will be a separate, different set of featured products. In essence, I want the behavior as if I had two separate featured flags, one for one set and the other for another set.
Re: How to create Alternate Featured Item section on home page?
Posted: Mon Jul 20, 2009 6:32 am
by mazhar
In this scenario I think the solution you provided in your first post will workout.
Re: How to create Alternate Featured Item section on home page?
Posted: Mon Jul 20, 2009 7:26 am
by ZLA
When I look at the ProductDataSource class, it seems like there are million different methods I could use. Can you make a recommendation or give me hints as to what the main differences between the types of methods are? For example, I see methods for:
- AdvancedSearch
- FindProducts
- LoadForCriteria
- LoadForIds
- NarrowSearch
Thanks.
Re: How to create Alternate Featured Item section on home page?
Posted: Mon Jul 20, 2009 7:30 am
by mazhar
Make use of NarrowSearch like
Code: Select all
ProductDataSource.NarrowSearch(string.Empty, 23, 0, 0, 0);
where 23 represents your category id.
Re: How to create Alternate Featured Item section on home page?
Posted: Mon Jul 20, 2009 7:46 am
by ZLA
Wonderful! Thanks.
Re: How to create Alternate Featured Item section on home page?
Posted: Mon Jul 20, 2009 7:55 am
by jmestep
I've done it a couple of different ways, but it was based on what you are suggesting- putting the products in a hidden category also. If you want the ones by just a particular category, you can have a hidden Featured Products sub category for each category.
I've adapted the GetRandomFeaturedProducts and used
// ProductList.DataSource = ProductDataSource.GetRandomFeaturedProducts(0, true,IncludeOutOfStockItems, this.Size);
//w2m jme 042809 pull from this category only
ProductList.DataSource= ProductDataSource.GetFeaturedProducts(_CategoryId, true, IncludeOutOfStockItems, _MaxItems, 0);
I've also done New Items that way where the merchant wanted to define the new items for each category, based on his choices, not a date filter.
if (node.Name.ToUpper() == "NEW ITEMS")
{
_NewItemsCategoryId = node.CatalogNodeId;
}
Re: How to create Alternate Featured Item section on home page?
Posted: Mon Jul 20, 2009 8:05 am
by ZLA
Thanks Judy.