ContentLifecycleStatus on a Product

Posted by Community Admin on 05-Aug-2018 12:29

ContentLifecycleStatus on a Product

All Replies

Posted by Community Admin on 23-Aug-2011 00:00

Hi,

For as far as I know the following code should be run without problems?

var manager = CatalogManager.GetManager();
            this.rptProductSlider.DataSource = manager.GetProducts().Where(p=>p.Status == ContentLifecycleStatus.Live).ToList();
            this.rptProductSlider.DataBind();

I'm getting the following exception:
"Identifier 'Status' is not a parameter or variable or field of 'Telerik.Sitefinity.Ecommerce.Catalog.Model.Product'. If 'Status' is a property please add the FieldAlias or Storage attribute to it or declare it as a field's alias."

The problem is that I'm return product images, but I have multiple records. Every image is returned twice. Or should I do this check only on the ProductImage property?

Regards,
Daniel

Posted by Community Admin on 23-Aug-2011 00:00

Sorry, something wrong with my code. The method 'GetProducts()' returns the right count of products.

This thread is closed