Bitcoin

BitMiner - free and simple next generation Bitcoin mining software

martes, marzo 23, 2010

Corregir error de Precios en Cero de OSCommerce

Para corregir el error basta con hacer lo siguiente:

1.- Busca el siguiente código en includes/application_top.php:


// currency

if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {
if (!tep_session_is_registered('currency')) tep_session_register('currency');

if (isset($HTTP_GET_VARS['currency'])) {
if (!$currency = tep_currency_exists($HTTP_GET_VARS['currency'])) $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
} else {
$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
}
}



Reemplaza por el siguiente código:




// currency

if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) { 
if (!tep_session_is_registered('currency')) tep_session_register('currency'); 

if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) { 
$currency = $HTTP_GET_VARS['currency']; 
} else { 
$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY; 
}
}



2.- Busca el siguiente código en includes/functions/general.php




////



// Checks to see if the currency code exists as a currency
// TABLES: currencies
function tep_currency_exists($code) {
$code = tep_db_prepare_input($code);
$currency_code = tep_db_query("select currencies_id from " . TABLE_CURRENCIES . " where code = '" . tep_db_input($code) . "'");
if (tep_db_num_rows($currency_code)) {
return $code;
} else {
return false;
}
}
Reemplaza por el siguiente código:


////
// Checks to see if the currency code exists as a currency
// TABLES: currencies
function tep_currency_exists($code) { 
$code = tep_db_prepare_input($code); 
$currency_query = tep_db_query("select code from " . TABLE_CURRENCIES . " where code = '" . tep_db_input($code) . "' limit 1"); 
if (tep_db_num_rows($currency_query)) { 
$currency = tep_db_fetch_array($currency_query); 
return $currency['code']; 
} else { 
return false; 
}
}

3.- Y por último dirígete a
includes/languages busca la siguiente línea:


//define('LANGUAGE_CURRENCY', 'EUR');

Y en lugar de EUR coloca las siglas de tu moneda, ejemplo: En México es MXN


define('LANGUAGE_CURRENCY', 'MXN');
Y eso es todo, después de eso si algo falla, solo borra el cache del navegador y verifica que los datos se muestren correctamente

-FMX-

3 comentarios:

  1. En la carpeta includes, no hay un archivo lenguage, los archivos lenguage estan en dentro de la carpeta lenguage y vienen en ingles, español y german, es en uno de esos?

    ResponderEliminar

Tu comentario es importante para nosotros, gracias por darnos tu opinión.