Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.


API reference for StockComponent in Vendr, the eCommerce solution for Umbraco v8+


Component to hook into the content saved event handler in order to update stock values. We have to do it this way because we need to ensure a content item has been saved and has a key before we can persist the stock as we need the key as reference. Without this, you'd have to disallow entry during create which isn't an ideal UX. With this approach, we can allow a stock level to be entered straight away and only persist it when the content item itself has been persisted.

public class StockComponent : IComponent




public StockComponent(IProductService productService, IDataTypeService dataTypeService, 
    IContentTypeService contentTypeService, ICacheAccessor cacheAccessor)



public void Initialize()


public void Terminate()

Edit this page on GitHub

Site + logo design © 2024 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.