The inventory of a variation represents its available quantity in the store. You can configure the Ecommerce to track the available quantity and to perform an action after a product variation has depleted. The inventory can be managed through the following properties of the ProductVariation class:
To track the inventory of product’s variations, you have first to enable it on a product level. To do this, modify the product and set its TrackInventory property to TrackInventory.TrackByVariations. For more information about how to modify a product, read For developers: Modify products. Here is a code example:
To enable tracking for a variation, you must modify the variation and set its TrackInventory property to TrackInventory.TrackByVariations. For more information about how to modify a variation, read For developers: Modify product variations. Here is a code example:
NOTE: The inventory of the product must be configured to be tracked by variations.
To disable tracking for a variation, you must modify the variation and set its TrackInventory property to TrackInventory.DonotTrack. For more information about how to modify a variation, read For developers: Modify product variations. Here is a code example:
To available quantity of a variation, you must modify the variation and set its Inventory property to the desired value. For more information about how to modify a variation, read For developers: Modify product variations. Here is a code example:
Sign up for our free beginner training. Boost your credentials through advanced courses and certification. Register for Sitefinity training and certification.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important