Closed avrumi-kolman closed 5 years ago
Hi! Just use Entities.product.associations.stock_availables. Get the product from Factories.ProductFactory or create new, change or add on associations.stock list and update the product. Hope it helps.
Hello @avrumi-kolman, as @FrancMunoz said, the product.cs
quantity
property is read only, to edit the product's stock, you have to edit its stock_availables
.
You can find an example at #347.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I'm trying to update the inventory available for a given product, but the
Quantity
property only has aget
, noset
.https://github.com/Bukimedia/PrestaSharp/blob/26f0784f45c50d6a1dcd490dd84f26a2005f1a5d/Entities/product.cs#L28
Is there a specific reason for this? And if so, how else would I update the inventory available for any given item?