Пример #1
0
 /**
  * Assigns wrapping VAT and card price + card message info
  *
  * @param Basket $oBasket basket object
  */
 protected function _setWrapping(Basket $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);
 }