+1-888-365-2779
Try Now
More in this section

Forums / Ecommerce / ContentLifecycleStatus on a Product

ContentLifecycleStatus on a Product

2 posts, 0 answered
  1. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    23 Aug 2011
    Link to this post
    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
  2. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    23 Aug 2011
    Link to this post
    Sorry, something wrong with my code. The method 'GetProducts()' returns the right count of products.
2 posts, 0 answered