protected function _buildXMLAdditional( MShop_Common_Manager_Interface $orderBaseManager,
		MShop_Order_Item_Base_Interface $base, DOMDocument $dom, DOMElement $orderitem )
	{
		$orderCouponManager = $orderBaseManager->getSubManager( 'coupon' );
		$criteria = $orderCouponManager->createSearch();
		$criteria->setConditions( $criteria->compare( '==', 'order.base.coupon.baseid', $base->getId() ) );
		$criteria->setSortations( array( $criteria->sort( '+', 'order.base.coupon.code' ) ) );
		$coupons = $orderCouponManager->searchItems( $criteria );

		$additional = $dom->createElement( 'additional' );
		$this->_appendChildCDATA( 'comment', '', $dom, $additional );

		$couponItem = $dom->createElement( 'discount' );

		foreach( $coupons as $coupon ) {
			$this->_appendChildCDATA( 'code', $coupon->getCode(), $dom, $couponItem );
		}

		$additional->appendChild( $couponItem );
		$orderitem->appendChild( $additional );
	}
protected function _buildXMLAdditional( MShop_Common_Manager_Interface $orderBaseManager,
		MShop_Order_Item_Base_Interface $base, DOMDocument $dom, DOMElement $orderitem )
	{
		$orderCouponManager = $orderBaseManager->getSubManager( 'coupon' );
		$criteria = $orderCouponManager->createSearch();
		$criteria->setConditions( $criteria->compare( '==', 'order.base.coupon.baseid', $base->getId() ) );
		$criteria->setSortations( array( $criteria->sort( '+', 'order.base.coupon.code' ) ) );
		$coupons = $orderCouponManager->searchItems( $criteria );

		$additional = $dom->createElement( 'additional' );
		$this->_appendChildCDATA( 'comment', '', $dom, $additional );

		$couponItem = $dom->createElement( 'discount' );

		foreach( $coupons as $coupon ) {
			$this->_appendChildCDATA( 'code', $coupon->getCode(), $dom, $couponItem );
		}

		$additional->appendChild( $couponItem );
		$orderitem->appendChild( $additional );
	}
protected function _buildXMLAdditional ( MShop_Common_Manager_Interface $ orderBaseManager , MShop_Order_Item_Base_Interface $ base , DOMDocument $ dom , DOMElement $ orderitem ) { $ orderCouponManager = $ orderBaseManager -> getSubManager ( 'coupon' ) ; $ criteria = $ orderCouponManager -> createSearch ( ) ; $ criteria -> setConditions ( $ criteria -> compare ( '==' , 'order.base.coupon.baseid' , $ base -> getId ( ) ) ) ; $ criteria -> setSortations ( array ( $ criteria -> sort ( '+' , 'order.base.coupon.code' ) ) ) ; $ coupons = $ orderCouponManager -> searchItems ( $ criteria ) ; $ additional = $ dom -> createElement ( 'additional' ) ; $ this -> _appendChildCDATA ( 'comment' , '' , $ dom , $ additional ) ; $ couponItem = $ dom -> createElement ( 'discount' ) ; foreach ( $ coupons as $ coupon ) { $ this -> _appendChildCDATA ( 'code' , $ coupon -> getCode ( ) , $ dom , $ couponItem ) ; } $ additional -> appendChild ( $ couponItem ) ; $ orderitem -> appendChild ( $ additional ) ; }
Adds the "additional" section to the XML object

@param MShop_Order_Manager_Base_Interface $orderBaseManager Order base manager object
@param MShop_Order_Item_Base_Interface $base Order base object
@param DOMDocument $dom DOM document object with contains the XML structure
@param DOMElement $orderitem DOM element which will be the parent of the new child
@throws DOMException If an error occures
Adds the additional section to the XML object