More in this section
Forums / Ecommerce / ContentLifecycleStatus on a Product

ContentLifecycleStatus on a Product

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
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