protected function _addAttributes( $parentid, array $data, $domain )
	{
		$context =  $this->_getContext();
		$attrManager = MShop_Factory::createManager( $context, 'attribute' );
		$listManager = MShop_Factory::createManager( $context, $domain . '/list' );


		$item = $attrManager->createItem();
		$item->setDomain( $domain );

		$listItem = $listManager->createItem();
		$listItem->setParentId( $parentid );
		$listItem->setDomain( 'attribute' );


		foreach( $data as $entry )
		{
			$item->setId( null );
			$item->setTypeId( $this->_getTypeId( 'attribute/type', $domain, $entry['type'] ) );
			$item->setCode( $entry['code'] );
			$item->setLabel( $entry['label'] );
			$item->setPosition( $entry['position'] );
			$item->setStatus( $entry['status'] );

			$attrManager->saveItem( $item );

			$listItem->setId( null );
			$listItem->setTypeId( $this->_getTypeId( $domain . '/list/type', 'attribute', $entry['list-type'] ) );
			$listItem->setDateStart( $entry['list-start'] );
			$listItem->setDateEnd( $entry['list-end'] );
			$listItem->setConfig( $entry['list-config'] );
			$listItem->setPosition( $entry['list-position'] );
			$listItem->setStatus( $entry['list-status'] );
			$listItem->setRefId( $item->getId() );

			$listManager->saveItem( $listItem, false );


			if( isset( $entry['attribute'] ) ) {
				$this->_addAttributes( $item->getId(), $entry['attribute'], 'attribute' );
			}

			if( isset( $entry['media'] ) ) {
				$this->_addMedia( $item->getId(), $entry['media'], 'attribute' );
			}

			if( isset( $entry['price'] ) ) {
				$this->_addPrices( $item->getId(), $entry['price'], 'attribute' );
			}

			if( isset( $entry['text'] ) ) {
				$this->_addTexts( $item->getId(), $entry['text'], 'attribute' );
			}
		}
	}