VIP Posted May 24, 2018 Share Posted May 24, 2018 В объявлении Classifieds System к примеру сумма 1000 руб но показывает 1000.00 рубКак можно сделать что бы показывало 1000 руб? Версия движка 4.3.3Версия Classifieds System 1.1.9 Link to comment Share on other sites More sharing options...
newbie Posted May 24, 2018 Share Posted May 24, 2018 А как же копейки? У меня нет данного приложения. Поэтому немного погадаю.Для работы приложения нужна Commerce, в котором для сумм кол-во знаков после запятой устанавливается в \applications\nexus\sources\Money\Money.phpДобавьте после case 'XPF':case 'RUB': 1 Link to comment Share on other sites More sharing options...
ректор Posted May 31, 2018 Share Posted May 31, 2018 и что от этого изменится? Link to comment Share on other sites More sharing options...
ректор Posted May 31, 2018 Share Posted May 31, 2018 \applications\nexus\sources\Money\Money.php public static function numberOfDecimalsForCurrency( $currency ) { switch ( $currency ) { case 'CLF': return 4; case 'BHD': case 'IQD': case 'JOD': case 'KWD': case 'LYD': case 'OMR': case 'TND': return 3; case 'MGA': case 'MRO': return 1; case 'BIF': case 'BYR': case 'CLP': case 'CVE': case 'DJF': case 'GNF': case 'ISK': case 'JPY': case 'KMF': case 'KRW': case 'PYG': case 'RWF': case 'UGX': case 'UYI': case 'VND': case 'VUV': case 'XAF': case 'XOF': case 'XPF': case 'RUB': case 'BYN': return 0; default: return 2; } } изменить на default: return 0; или добавить после case 'XPF': case 'RUB': case 'BYN Link to comment Share on other sites More sharing options...
newbie Posted May 31, 2018 Share Posted May 31, 2018 и что от этого изменится?В стартовом посте указана проблема.В моем - возможное решение.Не знаю, как в Classifieds, но в Commerce у рублей должны пропасть копейки. изменить на default:return 0; или добавить после case 'XPF':Найти первый код и ниже добавить второйБылоcase 'XPF':Сталоcase 'XPF': case 'RUB': Link to comment Share on other sites More sharing options...
Zero108 Posted June 1, 2018 Share Posted June 1, 2018 (edited) Основную валюту в приложении Commerce поставьте RUB (или RUR) вместо USD. Edited June 1, 2018 by Zero108 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