Example #1
0
 /**
  * Check if a currency already exists.
  *
  * @param int|string $iso_code int for iso code number string for iso code
  * @param $iso_code_num
  * @param int $shop_id
  * @return bool
  */
 public static function exists($iso_code, $iso_code_num, $shop_id = 0)
 {
     if (is_int($iso_code)) {
         $currency_id = JeproshopCurrencyModelCurrency::getIdByIsoCodeNum((int) $iso_code_num, (int) $shop_id);
     } else {
         $currency_id = JeproshopCurrencyModelCurrency::getIdByIsoCode($iso_code, (int) $shop_id);
     }
     if ($currency_id) {
         return true;
     } else {
         return false;
     }
 }