protected function _buildXMLChildList( MShop_Order_Item_Base_Product_Interface $parent, array $products, DOMDocument $dom, DOMElement $productelement )
	{
		$childlist = $dom->createElement( 'childlist' );

		foreach( $products as $product )
		{
			$price = $product->getPrice();
			$total = $price->getValue() + $price->getCosts();

			$childproductitem = $dom->createElement( 'productitem' );

			$this->_appendChildCDATA( 'position', $product->getPosition(), $dom, $childproductitem );
			$this->_appendChildCDATA( 'code', $product->getProductCode(), $dom, $childproductitem );
			$this->_appendChildCDATA( 'name', $product->getName(), $dom, $childproductitem );
			$this->_appendChildCDATA( 'quantity', $product->getQuantity(), $dom, $childproductitem );

			$priceitem = $dom->createElement( 'priceitem' );
			$this->_appendChildCDATA( 'price', number_format( $price->getValue(), 2, '.', '' ), $dom, $priceitem );
			$this->_appendChildCDATA( 'shipping', number_format( $price->getCosts(), 2, '.', '' ), $dom, $priceitem );
			$this->_appendChildCDATA( 'discount', number_format( $price->getRebate(), 2, '.', '' ), $dom, $priceitem );
			$this->_appendChildCDATA( 'total', number_format( $total, 2, '.', '' ), $dom, $priceitem );
			$childproductitem->appendChild( $priceitem );

			$childlist->appendChild( $childproductitem );
		}

		$productelement->appendChild( $childlist );
	}
protected function _buildXMLChildList( MShop_Order_Item_Base_Product_Interface $parent, array $products, DOMDocument $dom, DOMElement $productelement )
	{
		$childlist = $dom->createElement( 'childlist' );

		foreach( $products as $product )
		{
			$price = $product->getPrice();
			$total = $price->getValue() + $price->getCosts();

			$childproductitem = $dom->createElement( 'productitem' );

			$this->_appendChildCDATA( 'position', $product->getPosition(), $dom, $childproductitem );
			$this->_appendChildCDATA( 'code', $product->getProductCode(), $dom, $childproductitem );
			$this->_appendChildCDATA( 'name', $product->getName(), $dom, $childproductitem );
			$this->_appendChildCDATA( 'quantity', $product->getQuantity(), $dom, $childproductitem );

			$priceitem = $dom->createElement( 'priceitem' );
			$this->_appendChildCDATA( 'price', number_format( $price->getValue(), 2, '.', '' ), $dom, $priceitem );
			$this->_appendChildCDATA( 'shipping', number_format( $price->getCosts(), 2, '.', '' ), $dom, $priceitem );
			$this->_appendChildCDATA( 'discount', number_format( $price->getRebate(), 2, '.', '' ), $dom, $priceitem );
			$this->_appendChildCDATA( 'total', number_format( $total, 2, '.', '' ), $dom, $priceitem );
			$childproductitem->appendChild( $priceitem );

			$childlist->appendChild( $childproductitem );
		}

		$productelement->appendChild( $childlist );
	}
protected function _buildXMLChildList ( MShop_Order_Item_Base_Product_Interface $ parent , array $ products , DOMDocument $ dom , DOMElement $ productelement ) { $ childlist = $ dom -> createElement ( 'childlist' ) ; foreach ( $ products as $ product ) { $ price = $ product -> getPrice ( ) ; $ total = $ price -> getValue ( ) + $ price -> getCosts ( ) ; $ childproductitem = $ dom -> createElement ( 'productitem' ) ; $ this -> _appendChildCDATA ( 'position' , $ product -> getPosition ( ) , $ dom , $ childproductitem ) ; $ this -> _appendChildCDATA ( 'code' , $ product -> getProductCode ( ) , $ dom , $ childproductitem ) ; $ this -> _appendChildCDATA ( 'name' , $ product -> getName ( ) , $ dom , $ childproductitem ) ; $ this -> _appendChildCDATA ( 'quantity' , $ product -> getQuantity ( ) , $ dom , $ childproductitem ) ; $ priceitem = $ dom -> createElement ( 'priceitem' ) ; $ this -> _appendChildCDATA ( 'price' , number_format ( $ price -> getValue ( ) , 2 , '.' , '' ) , $ dom , $ priceitem ) ; $ this -> _appendChildCDATA ( 'shipping' , number_format ( $ price -> getCosts ( ) , 2 , '.' , '' ) , $ dom , $ priceitem ) ; $ this -> _appendChildCDATA ( 'discount' , number_format ( $ price -> getRebate ( ) , 2 , '.' , '' ) , $ dom , $ priceitem ) ; $ this -> _appendChildCDATA ( 'total' , number_format ( $ total , 2 , '.' , '' ) , $ dom , $ priceitem ) ; $ childproductitem -> appendChild ( $ priceitem ) ; $ childlist -> appendChild ( $ childproductitem ) ; } $ productelement -> appendChild ( $ childlist ) ; }
Adds the list of child products to the bundle products in the XML object

@param MShop_Order_Item_Base_Product_Interface $parent The bundle product
@param array $products List of child products attached to $parent
@param DOMDocument $dom DOM document object with contains the XML structure
@param DOMElement $productelement DOM element to which the child products are added
Adds the list of child products to the bundle products in the XML object