Jump to product page

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
cgreathouse
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 21
Joined: Tue Mar 03, 2009 10:49 am

Jump to product page

Post by cgreathouse » Mon Apr 06, 2009 8:35 am

Hello

I'm trying to figure out how to jump to a product page when an SKU is passed in. Something like this...

http://www.myshop.com/Default.aspx?SKU=ASDF-ASDF

Any pointers on how to go directly to the product with the matching SKU?

Thanks!

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

Re: Jump to product page

Post by mazhar » Mon Apr 06, 2009 9:02 am

Create some custom control that reads sku from query string and then loads products with matching sku on run time. For example you could use some custom query

Code: Select all

string sku = Request.QueryString["Sku"];
ProductCollection products = ProductDataSource.LoadForCriteria(" Sku LIKE '"+sku+"'");
...
...
Also read following article it may help you.
viewtopic.php?f=45&t=6971

cgreathouse
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 21
Joined: Tue Mar 03, 2009 10:49 am

Re: Jump to product page

Post by cgreathouse » Mon Apr 06, 2009 9:24 am

Getting closer.

So that will help me get the product that matches that SKU. But how do I jump to that product page?

If I have a product called something like "Super Mobile Phone", the URL for the product page looks something like ".../Super-Mobile-Phone-P60.aspx". Is there a way to know what the URL for a product?

Thanks!

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

Re: Jump to product page

Post by mazhar » Mon Apr 06, 2009 9:50 am

You can use Product.NavigateUrl property to get the product details page url for a product.

Post Reply