Page 1 of 1

Custom Product Pages

Posted: Fri Jun 05, 2009 3:19 pm
by wilhud
I'm not sure if this has been answered before. Tried searching but wasn't really sure what it would be called. Here's basically what I'm trying to find out...

Is there a simple way to build a page where it shows a list of products that I custom choose? Examples would be a New Items Page (List of all Items added in the past month or even the last X number of items added), Best Sellers Page (Top X number of items sold in the store), Sale Items Page (List of all items where price is lower than MSRP value), Price Range Page (List of all items inside a specified price range, i.e. $0-$20).

I can build these things from scratch, if needed, but was just curious if there was some pre-existing page or code that was already integrated that I could use as a starting point. The software is quite robust, I'm really liking it a lot...it's just going to take me a while to familiarize myself with all of the parts. I've already customized so much in a short period of time and it's fairly simple to do.

Thanks!
Wil

Re: Custom Product Pages

Posted: Sat Jun 06, 2009 6:28 am
by jmestep
You can do that buy using the ProductDataSource.LoadForCriteria() with parameters.
Here is one I did for new products using a copy of the featured products conlib for display

I used this:
ProductList.DataSource=ProductDataSource.LoadForCriteria("DisablePurchase='0' and VisibilityId=0", 30, 0, "CreatedDate DESC");

instead of this:
ProductList.DataSource = ProductDataSource.GetRandomFeaturedProducts(0, true, this.Size);

Re: Custom Product Pages

Posted: Mon Jun 08, 2009 11:48 am
by wilhud
Very Cool! Sounds like exactly what I need.
Thank you Judy, I will check that out today.

Wil

Re: Custom Product Pages

Posted: Mon Jun 08, 2009 3:05 pm
by wilhud
Worked great! I used your code for the new items section and also used the code from the PopularProducts dialog to get a best sellers page...

ProductList.DataSource = ProductDataSource.GetPopularProducts(30);

Seems to be working as expected. I'll have to play around with the other pages, but these two were the main ones I wanted to get up.

Thanks again for the help! :)

Wil