More in this section
Forums / Ecommerce / Setting and Displaying Inventory in Custom Catalog Provider

Setting and Displaying Inventory in Custom Catalog Provider

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.
1 posts, 0 answered
  1. David
    David avatar
    1 posts
    27 May 2014
    17 Jun 2014
    Link to this post


    We have overridden the OpenAccessCatalogDataProvider with our own that searches an external system for product price and inventory.  We are attempting to merge the price and inventory values with the Sitefinity product object and then displayed on the product detail (and list) widgets. The data is correctly set on the (product) object in the provider (inventory should be 203), however the Inventory value is not reflected on the widget but the price is (see attachment - the highlighted inv:0).  

    To be sure, I have pre-set the product to be tracked via the Sitefinity UI.  Sample code:

    private void updatePrice(Telerik.Sitefinity.Modules.Ecommerce.Catalog.Model.Product product, ExternalProduct externalProduct) 


                product.Price = externalProduct.Price;
                product.Inventory = externalProduct.Inventory.Sum(x => x.AvailableQuantity);
                if (product.Inventory == 0)
                    product.OutOfStockOption = OutOfStockOption.DisplayButDontAllowOrders;


     It appears that Sitefinity is somehow removing the inventory value before passing it to the widgets.  Is there something that I maybe missing?


1 posts, 0 answered