Wo wird im Bestellvorgang der Artikelbestand angepasst?

Ich stehe etwas auf dem Schlauch. Wo genau wird im Bestellvorgang der Artikelbestand angepasst?
Ich habe es mit oxarticle.reduceStock() probiert, das ist es aber wohl nicht…

Order->finalizeOrder() müsste es sein

Danke für die schnelle Antwort, leider habe ich dort nichts gefunden, oder übersehe ich etwas?

public function finalizeOrder(\OxidEsales\Eshop\Application\Model\Basket $oBasket, $oUser, $blRecalculatingOrder = false)
    // check if this order is already stored
    $orderId = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sess_challenge');
    if ($this->_checkOrderExist($orderId)) {
        \OxidEsales\Eshop\Core\Registry::getLogger()->debug('finalizeOrder: Order already exists: ' . $orderId, [$oBasket, $oUser]);
        // we might use this later, this means that somebody clicked like mad on order button
        return self::ORDER_STATE_ORDEREXISTS;

    // if not recalculating order, use sess_challenge id, else leave old order id
    if (!$blRecalculatingOrder) {
        // use this ID

        // validating various order/basket parameters before finalizing
        if ($iOrderState = $this->validateOrder($oBasket, $oUser)) {
            return $iOrderState;

    // copies user info

    // copies basket info

    // payment information
    $oUserPayment = $this->_setPayment($oBasket->getPaymentId());

    // set folder information, if order is new
    // #M575 in recalculating order case folder must be the same as it was
    if (!$blRecalculatingOrder) {

    // marking as not finished

    //saving all order data to DB

    // executing payment (on failure deletes order and returns error code)
    // in case when recalculating order, payment execution is skipped
    if (!$blRecalculatingOrder) {
        $blRet = $this->_executePayment($oBasket, $oUserPayment);
        if ($blRet !== true) {
            return $blRet;

    if (!$this->oxorder__oxordernr->value) {
    } else {
        oxNew(\OxidEsales\Eshop\Core\Counter::class)->update($this->_getCounterIdent(), $this->oxorder__oxordernr->value);

    // deleting remark info only when order is finished

    //#4005: Order creation time is not updated when order processing is complete
    if (!$blRecalculatingOrder) {

    // updating order trans status (success status)

    // store orderid

    // updating wish lists
    $this->_updateWishlist($oBasket->getContents(), $oUser);

    // updating users notice list
    $this->_updateNoticeList($oBasket->getContents(), $oUser);

    // marking vouchers as used and sets them to $this->_aVoucherList (will be used in order email)
    // skipping this action in case of order recalculation
    if (!$blRecalculatingOrder) {
        $this->_markVouchers($oBasket, $oUser);

    // send order by email to shop owner and current user
    // skipping this action in case of order recalculation
    if (!$blRecalculatingOrder) {
        $iRet = $this->_sendOrderByEmail($oUser, $oBasket, $oUserPayment);
    } else {
        $iRet = self::ORDER_STATE_OK;

    return $iRet;

In validateOrder(…) → validateStock sollte es sein