/** * Assigns wrapping VAT and card price + card message info * * @param oxBasket $oBasket basket object */ protected function _setWrapping(oxBasket $oBasket) { $myConfig = $this->getConfig(); // wrapping price if ($oWrappingCost = $oBasket->getCosts('oxwrapping')) { $this->oxorder__oxwrapcost = new oxField($oWrappingCost->getBruttoPrice(), oxField::T_RAW); // wrapping VAT will be always calculated (#3757) $this->oxorder__oxwrapvat = new oxField($oWrappingCost->getVAT(), oxField::T_RAW); } if ($oGiftCardCost = $oBasket->getCosts('oxgiftcard')) { $this->oxorder__oxgiftcardcost = new oxField($oGiftCardCost->getBruttoPrice(), oxField::T_RAW); $this->oxorder__oxgiftcardvat = new oxField($oGiftCardCost->getVAT(), oxField::T_RAW); } // greetings card $this->oxorder__oxcardid = new oxField($oBasket->getCardId(), oxField::T_RAW); // card text will be stored in database $this->oxorder__oxcardtext = new oxField($oBasket->getCardMessage(), oxField::T_RAW); }
/** * Assigns wrapping VAT and card price + card message info * * @param oxBasket $oBasket basket object * * @return null */ protected function _setWrapping(oxBasket $oBasket) { $myConfig = $this->getConfig(); // wrapping price if ($oWrappingCost = $oBasket->getCosts('oxwrapping')) { $this->oxorder__oxwrapcost = new oxField($oWrappingCost->getBruttoPrice(), oxField::T_RAW); // wrapping VAT if ($myConfig->getConfigParam('blCalcVatForWrapping')) { $this->oxorder__oxwrapvat = new oxField($oWrappingCost->getVAT(), oxField::T_RAW); } } // greetings card $this->oxorder__oxcardid = new oxField($oBasket->getCardId(), oxField::T_RAW); // card text will be stored in database $this->oxorder__oxcardtext = new oxField($oBasket->getCardMessage(), oxField::T_RAW); }