/** * Marks voucher as used (oxvoucher::markAsUsed()) * and sets them to $this->_aVoucherList. * * @param oxBasket $oBasket basket object * @param oxUser $oUser user object */ protected function _markVouchers($oBasket, $oUser) { $this->_aVoucherList = $oBasket->getVouchers(); if (is_array($this->_aVoucherList)) { foreach ($this->_aVoucherList as $sVoucherId => $oSimpleVoucher) { $oVoucher = oxNew('oxvoucher'); $oVoucher->load($sVoucherId); $oVoucher->markAsUsed($this->oxorder__oxid->value, $oUser->oxuser__oxid->value, $oSimpleVoucher->dVoucherdiscount); $this->_aVoucherList[$sVoucherId] = $oVoucher; } } }