creating a second featured products con lib.

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
pizzaovens
Ensign (ENS)
Ensign (ENS)
Posts: 19
Joined: Wed Oct 01, 2008 10:05 am

creating a second featured products con lib.

Post by pizzaovens » Fri Jan 23, 2009 1:40 pm

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?

User avatar
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.

Post by jmestep » Fri Jan 23, 2009 3:44 pm

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:

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();
    }
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);
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

pizzaovens
Ensign (ENS)
Ensign (ENS)
Posts: 19
Joined: Wed Oct 01, 2008 10:05 am

Re: creating a second featured products con lib.

Post by pizzaovens » Fri Jan 23, 2009 3:52 pm

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.

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

Re: creating a second featured products con lib.

Post by mazhar » Sat Jan 24, 2009 4:28 am

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.

pizzaovens
Ensign (ENS)
Ensign (ENS)
Posts: 19
Joined: Wed Oct 01, 2008 10:05 am

Re: creating a second featured products con lib.

Post by pizzaovens » Mon Jan 26, 2009 2:05 pm

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.

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

Re: creating a second featured products con lib.

Post by mazhar » Tue Jan 27, 2009 3:57 am

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.

Post Reply