Get a product by SKU

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
andytauber
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 28
Joined: Thu Jun 05, 2008 6:11 pm

Get a product by SKU

Post by andytauber » Sun Aug 09, 2009 6:01 pm

Id there a way to get a product recodr by SKU?

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

Re: Get a product by SKU

Post by mazhar » Mon Aug 10, 2009 2:17 am

All you need is to make use of LoadForCriteria method of ProductDataSource class for example if you want to load product with SKU "TESTSKU"

Code: Select all

CommerceBuilder.Products.ProductCollection products = CommerceBuilder.Products.ProductDataSource.LoadForCriteria(" SKU = 'TESTSKU' ");

Post Reply