iBO Web Content / Product Page

I am trying to find a way to retrieve product information for the current product or to retrieve information for the current web content the user is viewing.

The issue I'm having with retrieving the product information is that I can't find a way to retrieve the specific product that is being viewed. The query string parameters on the product.aspx page contain a category id and a product id. When I use iBO to query for the current product, I can't find a way to retrieve the product based on the catId or prodId in the query string parameters.

The other thing I need to do is to retrieve the content record in iBO for the web content the user is currently viewing. The CContent class has the properties that I need, but I'm not sure how to get the CContent record based on the current URL. Is the content class stored in the web context? Or do I need to query all content records then somehow filter it to get my content record?

I would appreciate any guidance on these two items.

Thanks!
James

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hi Product Id can’t be

Hi

Product Id can’t be used directly to get the product details from CProduct or CStandardProduct class, these objects accepts only product code.
You can get the product code from product id executing the below sql statement.

SELECT ProductCode FROM OrderProduct WHERE OrderProductID = Request.QueryString.Get("ProductId")

CStandardProduct product = new CStandardProduct(user, ProductCode);

Balaji