creating a second featured products con lib.
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Oct 01, 2008 10:05 am
creating a second featured products con lib.
would it be possable to create a 2nd featured products conlib control so i can display two sets of featured products on our home page? has anyone tryed this before?
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: creating a second featured products con lib.
You would have to have some way to determine which products. I've got a featured products grid that is on each category page with products from that category only. Here is a snippet of the code from that:
You can show ones on the front page if you have them included in a particular category (Like a hidden Category with category id of 128, then use
ProductList.DataSource = ProductDataSource.GetRandomFeaturedProducts(128, true, this.Size);
Code: Select all
.
protected void Page_Load(object sender, EventArgs e)
{
_GlobalDisablePurchase = Token.Instance.Store.Settings.ProductPurchasingDisabled;
//if (!string.IsNullOrEmpty(this.Caption)) CaptionLabel.Text = this.Caption;
ProductList.RepeatColumns = this.Columns;
int cid = PageHelper.GetCategoryId();
ProductList.DataSource = ProductDataSource.GetRandomFeaturedProducts(cid, true, this.Size);
ProductList.DataBind();
}
ProductList.DataSource = ProductDataSource.GetRandomFeaturedProducts(128, true, this.Size);
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Oct 01, 2008 10:05 am
Re: creating a second featured products con lib.
we are trying to feature one item at a reduced cost on the front page that i can select and change. which is the ideal for featured products con lib. however i have allready used that control on the front page and cant find a solution to keep those products up front (that i can control what is displayed) along with controling the 1 item a day that is a great deal.
Re: creating a second featured products con lib.
I think it would be better to put some custom flag for those products you want to display on your home page. For example read the following post, you can do some trick and write a very similar code to keep an extra setting for products
viewtopic.php?f=44&t=9088&p=39809&hilit=warning#p39809
Then you can make a copy of FeaturedProductsGrid control and customize the way it loads product. New control will load the products depending upon the new setting you made for products.
viewtopic.php?f=44&t=9088&p=39809&hilit=warning#p39809
Then you can make a copy of FeaturedProductsGrid control and customize the way it loads product. New control will load the products depending upon the new setting you made for products.
-
- Ensign (ENS)
- Posts: 19
- Joined: Wed Oct 01, 2008 10:05 am
Re: creating a second featured products con lib.
that sounds useful but not quite what i was looking to do. has anyone been able to have two versions of featuredproduct display at once? id think you could just copy and rename parts of the file to make it work.
Re: creating a second featured products con lib.
You just need to put [[CobLib:FeaturedProductsGrid]] statement where ever you want to show the grid. You can have featured products grid at multiple locations, but all the different versions will show the same featured products.