Sano4kin Posted July 12, 2019 Share Posted July 12, 2019 Подскажите, как правильно отредактировать код чтобы цена на сайте была без копеек? а то при импорте из excel цены выглядят так: 54, 379 руб, 259, 5279 руб... public static function ps_round($value, $precision = 0, $round_mode = null) { if ($round_mode === null) { if (Tools::$round_mode == null) { Tools::$round_mode = (int) Configuration::get('PS_PRICE_ROUND_MODE'); } $round_mode = Tools::$round_mode; } switch ($round_mode) { case PS_ROUND_UP: return Tools::ceilf($value, $precision); case PS_ROUND_DOWN: return Tools::floorf($value, $precision); case PS_ROUND_HALF_DOWN: case PS_ROUND_HALF_EVEN: case PS_ROUND_HALF_ODD: return Tools::math_round($value, $precision, $round_mode); case PS_ROUND_HALF_UP: default: return Tools::math_round($value, $precision, PS_ROUND_HALF_UP); } } Это исходный код. Версия PS - 1.7.6 Заранее спасибо! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now