Merx

$productPage->reduceStock()

Lowers the stock by the quantity ordered

$productPage->reduceStock(float $quantity): Wagnerwagner\Merx\ProductPage

Parameters

Name Type Default
$quantity float -

Return type

Wagnerwagner\Merx\ProductPage

The updated page

Description

Merx calls it for every product of a new order, while
wagnerwagner.merx.reduceStock is true. Override it together with
stock() when the stock is kept somewhere else, e.g. in an ERP.

Parent class

Wagnerwagner\Merx\ProductPage