Contributions
Currencies/price bug fix
Currencies/price bug fix for Oscommerce MS 2.2 and earlier version
Introduction
We've find bug in Oscommerce MS 2.2 and its earlier versions . Bug allows to buy any product with zero price. Bug is reproduced at live Oscommerce demo (http://demo.oscommerce.com/) .
Please check out http://demo.oscommerce.com/?currency=usd and look for price. It's zero now. May be in future Oscommerce team will fix it.
You can check out your store. Simply add ?currency=usd to any store URL.
Expand All / Collapse All
The file that must be edited is currencies.php instead of currency.php
New file attached
The solutions below didn't work for me a other solution did.
Edit includes/classes/currency.php on row +/- 38
replace
if (empty($currency_type)) $currency_type = $currency;
with
if (empty($currency_type)) $currency_type = strtoupper($currency);
para solucionar este problema solo aņadi un strtoupper() en el application_top.php quedando asi
// 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(strtoupper($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;
}
}
el archivo no contiene nada
Currencies/price bug fix for Oscommerce MS 2.2 and earlier version
Introduction
We've find bug in Oscommerce MS 2.2 and its earlier versions . Bug allows to buy any product with zero price. Bug is reproduced at live Oscommerce demo (http://demo.oscommerce.com/) .
Please check out http://demo.oscommerce.com/?currency=usd and look for price. It's zero now. May be in future Oscommerce team will fix it.
You can check out your store. Simply add ?currency=usd to any store URL.
Note: Contributions are used at own risk.