source/Application/Model/Voucher.php
protected function _getBasketItems($oDiscount = null)
    {
        if ($this->oxvouchers__oxorderid->value) {
            return $this->_getOrderBasketItems($oDiscount);
        } elseif ($this->getSession()->getBasket()) {
            return $this->_getSessionBasketItems($oDiscount);
        } else {
            return [];
        }
    }
protected function _getBasketItems($oDiscount = null)
    {
        if ($this->oxvouchers__oxorderid->value) {
            return $this->_getOrderBasketItems($oDiscount);
        } elseif ($this->getSession()->getBasket()) {
            return $this->_getSessionBasketItems($oDiscount);
        } else {
            return [];
        }
    }
protected function _getBasketItems ( $ oDiscount = null ) { if ( $ this -> oxvouchers__oxorderid -> value ) { return $ this -> _getOrderBasketItems ( $ oDiscount ) ; } elseif ( $ this -> getSession ( ) -> getBasket ( ) ) { return $ this -> _getSessionBasketItems ( $ oDiscount ) ; } else { return [ ] ; } }
Returns basket item information array from session or order.

@param \OxidEsales\Eshop\Application\Model\Discount $oDiscount discount object

@return array
Returns basket item information array from session or order .