oc-content/plugins/favorite_items/functions.php
// FORMAT PRICE FOR NEED OF THIS PLUGIN
FORMAT PRICE FOR NEED OF THIS PLUGIN
FORMAT PRICE FOR NEED OF THIS PLUGIN
function fi_price_format($price, $symbol_code) {
  if ($price === null) { 
    $final_price = osc_apply_filter('item_price_null', __('Check with seller', 'favorite_items')); 
  } else if ($price == 0) {
    $final_price = osc_apply_filter('item_price_zero', __('Free', 'favorite_items')); 
  } else {
    $final_price = $price/1000000;
    $aCurrency = Currency::newInstance()->findByPrimaryKey($symbol_code);
    if(isset($aCurrency['s_description'])) {
      $symbol = $aCurrency['s_description'];
    }
    $currencyFormat = osc_locale_currency_format();
    $currencyFormat = str_replace('{NUMBER}', number_format($final_price, osc_locale_num_dec(), osc_locale_dec_point(), osc_locale_thousands_sep()), $currencyFormat);
    $currencyFormat = str_replace('{CURRENCY}', $symbol, $currencyFormat);
    $final_price = $currencyFormat;
  }
  return $final_price;
}
function fi_price_format ( $ price , $ symbol_code ) { if ( $ price === null ) { $ final_price = osc_apply_filter ( 'item_price_null' , __ ( 'Check with seller' , 'favorite_items' ) ) ; } else if ( $ price == 0 ) { $ final_price = osc_apply_filter ( 'item_price_zero' , __ ( 'Free' , 'favorite_items' ) ) ; } else { $ final_price = $ price / 1000000 ; $ aCurrency = Currency :: newInstance ( ) -> findByPrimaryKey ( $ symbol_code ) ; if ( isset ( $ aCurrency [ 's_description' ] ) ) { $ symbol = $ aCurrency [ 's_description' ] ; } $ currencyFormat = osc_locale_currency_format ( ) ; $ currencyFormat = str_replace ( '{NUMBER}' , number_format ( $ final_price , osc_locale_num_dec ( ) , osc_locale_dec_point ( ) , osc_locale_thousands_sep ( ) ) , $ currencyFormat ) ; $ currencyFormat = str_replace ( '{CURRENCY}' , $ symbol , $ currencyFormat ) ; $ final_price = $ currencyFormat ; } return $ final_price ; }
FORMAT PRICE FOR NEED OF THIS PLUGIN
FORMAT PRICE FOR NEED OF THIS PLUGIN