SilverCart\Model\Product\Product::changeStockQuantityBy
Increments or decrements the products stock quantity.
By default the quantity will be incremented.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
Signature
public function changeStockQuantityBy(int
$quantity,
[boolean
$increment = true,
[string
$reason = '',
[int
$origin = StockItemEntry::ORIGIN_CODE_UNDEFINED,
[Order
$order = NULL]]]] )
Parameters
$quantity
— int- The amount to subtract from the current stock quantity
$increment
— boolean- Set to false to decrement quantity.
$reason
— string- Reason to change the stock quantity.
$origin
— int- Origin which changes the stock quantity.
$order
— SilverCart\Model\Order\Order- Order context
Returns
- $this