Hi,
We have in default Bender theme the option to select a locale for price ie. dollar, euro etc. They all have their own locale decimals thousands seperator and some have the same. Anyway, these are available for use BUT when posting a new ad the current core code only looks at the current locale which is not making sens if someone has the option to post a price in another valuta.
According to my logic Osclass needs helper functions that accomodate this option of chosing a valuta when posting a new ad. At this moment the Item.form.php is taking care of the price using this code:
static public function price_input_text($item = null)
{
if($item==null) { $item = osc_item(); };
if( Session::newInstance()->_getForm('price') != "" ) {
$item['i_price'] = Session::newInstance()->_getForm('price');
}
parent::generic_input_text('price', (isset($item['i_price'])) ? osc_prepare_price($item['i_price']) : null);
}
The function "osc_prepare_price" takes care of the locale using the function:
function osc_prepare_price($price) {
return number_format($price/1000000, osc_locale_num_dec(), osc_locale_dec_point(), osc_locale_thousands_sep());
}
The functions used in this function are all focused on the function "osc_current_user_locale()" meaning price format occurs always in user's current locale while website visitors are offered to post a new ad using an other locale/valuta but the price format stays the same.
We need helper functions that use price formatting based on chosen valuta, NOT the current user locale!
Hope I'm making sense, let's hear your comments on this matter please.
Regards,
Eric