protected function importNode( \DomElement $node, $domains, $parentid, array &$map )
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), 'catalog' );

		if( ( $attr = $node->attributes->getNamedItem( 'ref' ) ) !== null )
		{
			try
			{
				$item = $manager->findItem( $attr->nodeValue, $domains );
				$manager->moveItem( $item->getId(), $item->getParentId(), $parentid );

				$item = $this->process( $item, $node );
				$currentid = $manager->saveItem( $item )->getId();
				unset( $item );

				$tree = $manager->getTree( $currentid, [], \Aimeos\MW\Tree\Manager\Base::LEVEL_LIST );

				foreach( $tree->getChildren() as $child ) {
					$map[$child->getCode()] = $child->getId();
				}

				return $currentid;
			}
			catch( \Aimeos\MShop\Exception $e ) {} // not found, create new
		}

		$item = $this->process( $manager->createItem(), $node );
		return $manager->insertItem( $item, $parentid )->getId();
	}