protected function _addLocaleCurrencyData( MShop_Common_Manager_Interface $localeManager, array $data )
	{
		$this->_msg( 'Adding data for MShop locale currencies', 1 );

		$currencyItemManager = $localeManager->getSubManager( 'currency', 'Default' );

		$num = $total = 0;

		foreach( $data as $key => $dataset )
		{
			$total++;

			$currencyItem = $currencyItemManager->createItem();
			$currencyItem->setCode( $dataset['id'] );
			$currencyItem->setLabel( $dataset['label'] );
			$currencyItem->setStatus( $dataset['status'] );

			try {
				$currencyItemManager->saveItem($currencyItem);
				$num++;
			} catch( Exception $e ) { ; } // if currency was already available
		}

		$this->_status( $num > 0 ? $num . '/' . $total : 'OK' );
	}
protected function _addLocaleCurrencyData( MShop_Common_Manager_Interface $localeManager, array $data )
	{
		$this->_msg( 'Adding data for MShop locale currencies', 1 );

		$currencyItemManager = $localeManager->getSubManager( 'currency', 'Default' );

		$num = $total = 0;

		foreach( $data as $key => $dataset )
		{
			$total++;

			$currencyItem = $currencyItemManager->createItem();
			$currencyItem->setCode( $dataset['id'] );
			$currencyItem->setLabel( $dataset['label'] );
			$currencyItem->setStatus( $dataset['status'] );

			try {
				$currencyItemManager->saveItem($currencyItem);
				$num++;
			} catch( Exception $e ) { ; } // if currency was already available
		}

		$this->_status( $num > 0 ? $num . '/' . $total : 'OK' );
	}
protected function _addLocaleCurrencyData ( MShop_Common_Manager_Interface $ localeManager , array $ data ) { $ this -> _msg ( 'Adding data for MShop locale currencies' , 1 ) ; $ currencyItemManager = $ localeManager -> getSubManager ( 'currency' , 'Default' ) ; $ num = $ total = 0 ; foreach ( $ data as $ key => $ dataset ) { $ total ++ ; $ currencyItem = $ currencyItemManager -> createItem ( ) ; $ currencyItem -> setCode ( $ dataset [ 'id' ] ) ; $ currencyItem -> setLabel ( $ dataset [ 'label' ] ) ; $ currencyItem -> setStatus ( $ dataset [ 'status' ] ) ; try { $ currencyItemManager -> saveItem ( $ currencyItem ) ; $ num ++ ; } catch ( Exception $ e ) { ; } // if currency was already available } $ this -> _status ( $ num > 0 ? $ num . '/' . $ total : 'OK' ) ; }
Adds locale currency data.

@param MShop_Common_Manager_Interface $localeManager Locale manager
@param array $data Associative list of locale currency data
Adds locale currency data .