Round prices up to nearest 5 after conversion in oscommerce
Posted
by Rhyso
on Stack Overflow
See other posts from Stack Overflow
or by Rhyso
Published on 2010-04-29T16:55:41Z
Indexed on
2010/04/29
16:57 UTC
Read the original article
Hit count: 401
Hi there,
A conversion question relating to prices in oscommerce:
I am needing for a custom currency conversion to round the USD prices up to the nearest 5$ to avoid prices being displayed at silly prices such as $263.
I am trying to convert to an int and round the following line : $curr->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id']));
( as for some reason the price is displayed as a string, im guessing to include the currency sign)
However not having much luck.
Does anybody know where the root conversion takes place as it might be easier for me to round() or ceil() from there when it is a raw integer
Or any other ideas of how I can round the conversion?
Thanks for any help
Rhys Thomas
© Stack Overflow or respective owner