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:
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important