From 5939a3a28e24063c889aa2c9e8e4775fab824cf7 Mon Sep 17 00:00:00 2001 From: Serhii Korneliuk Date: Tue, 3 Dec 2024 23:21:13 +0200 Subject: [PATCH] [ADD] Currencies configure. --- config/currencies.php | 632 ++++++++++++++++++ lang/en/global.php | 16 +- lang/ru/global.php | 16 +- lang/uk/global.php | 16 +- module/sCommerceModule.php | 11 + src/Models/sProduct.php | 8 +- src/sCommerce.php | 37 +- views/index.blade.php | 19 +- views/partials/settingsCurrencyItem.blade.php | 92 +++ ...ttingsCurrencyPriceConfiguration.blade.php | 113 ++++ views/partials/style.blade.php | 1 + views/settingsTab.blade.php | 91 +-- 12 files changed, 943 insertions(+), 109 deletions(-) create mode 100644 views/partials/settingsCurrencyItem.blade.php create mode 100644 views/partials/settingsCurrencyPriceConfiguration.blade.php diff --git a/config/currencies.php b/config/currencies.php index 497cddd..b49c24b 100644 --- a/config/currencies.php +++ b/config/currencies.php @@ -5,6 +5,10 @@ 'alpha' => 'AED', 'numeric' => '784', 'symbol' => 'د.إ', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'AE', ], @@ -13,6 +17,10 @@ 'alpha' => 'AFN', 'numeric' => '971', 'symbol' => '؋', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'AF', ], @@ -21,6 +29,10 @@ 'alpha' => 'ALL', 'numeric' => '008', 'symbol' => 'ALL', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'AL', ], @@ -29,6 +41,10 @@ 'alpha' => 'AMD', 'numeric' => '051', 'symbol' => 'AMD', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'AM', ], @@ -37,6 +53,10 @@ 'alpha' => 'ANG', 'numeric' => '532', 'symbol' => 'ƒ', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'CW', @@ -48,6 +68,10 @@ 'alpha' => 'AOA', 'numeric' => '973', 'symbol' => 'AOA', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'AO', ], @@ -56,6 +80,10 @@ 'alpha' => 'ARS', 'numeric' => '032', 'symbol' => 'Arg$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'AR', ], @@ -64,6 +92,10 @@ 'alpha' => 'AUD', 'numeric' => '036', 'symbol' => 'A$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'AU', @@ -81,6 +113,10 @@ 'alpha' => 'AWG', 'numeric' => '533', 'symbol' => 'Aƒ', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'AW', ], @@ -89,6 +125,10 @@ 'alpha' => 'AZN', 'numeric' => '944', 'symbol' => '₼', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'AZ', ], @@ -97,6 +137,10 @@ 'alpha' => 'BAM', 'numeric' => '977', 'symbol' => 'BAM', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BA', ], @@ -105,6 +149,10 @@ 'alpha' => 'BBD', 'numeric' => '052', 'symbol' => 'Bds$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BB', ], @@ -113,6 +161,10 @@ 'alpha' => 'BDT', 'numeric' => '050', 'symbol' => '৳', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BD', ], @@ -121,6 +173,10 @@ 'alpha' => 'BGN', 'numeric' => '975', 'symbol' => 'BGN', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BG', ], @@ -129,6 +185,10 @@ 'alpha' => 'BHD', 'numeric' => '048', 'symbol' => '.د.ب', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 3, 'country' => 'BH', ], @@ -137,6 +197,10 @@ 'alpha' => 'BIF', 'numeric' => '108', 'symbol' => '₣Bu', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'BI', ], @@ -145,6 +209,10 @@ 'alpha' => 'BMD', 'numeric' => '060', 'symbol' => 'Ber$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BM', ], @@ -153,6 +221,10 @@ 'alpha' => 'BND', 'numeric' => '096', 'symbol' => 'BR$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BN', ], @@ -161,6 +233,10 @@ 'alpha' => 'BOB', 'numeric' => '068', 'symbol' => 'BOB', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BO', ], @@ -169,6 +245,10 @@ 'alpha' => 'BRL', 'numeric' => '986', 'symbol' => 'R$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BR', ], @@ -177,6 +257,10 @@ 'alpha' => 'BSD', 'numeric' => '044', 'symbol' => 'B$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BS', ], @@ -185,6 +269,10 @@ 'alpha' => 'BTN', 'numeric' => '064', 'symbol' => 'BTN', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BT', ], @@ -193,6 +281,10 @@ 'alpha' => 'BWP', 'numeric' => '072', 'symbol' => 'BWP', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'BW', @@ -204,6 +296,10 @@ 'alpha' => 'BYN', 'numeric' => '933', 'symbol' => 'B₽', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BY', ], @@ -212,6 +308,10 @@ 'alpha' => 'BZD', 'numeric' => '084', 'symbol' => 'BZ$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'BZ', ], @@ -220,6 +320,10 @@ 'alpha' => 'CAD', 'numeric' => '124', 'symbol' => 'C$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'CA', ], @@ -228,6 +332,10 @@ 'alpha' => 'CDF', 'numeric' => '976', 'symbol' => '₣C', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'CD', ], @@ -236,6 +344,10 @@ 'alpha' => 'CHF', 'numeric' => '756', 'symbol' => 'S₣', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'CH', @@ -247,6 +359,10 @@ 'alpha' => 'CLP', 'numeric' => '152', 'symbol' => 'Ch$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'CL', ], @@ -255,6 +371,10 @@ 'alpha' => 'CNY', 'numeric' => '156', 'symbol' => '¥', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'CN', ], @@ -263,6 +383,10 @@ 'alpha' => 'COP', 'numeric' => '170', 'symbol' => 'Col$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'CO', ], @@ -271,6 +395,10 @@ 'alpha' => 'CRC', 'numeric' => '188', 'symbol' => '₡', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'CR', ], @@ -279,6 +407,10 @@ 'alpha' => 'CUC', 'numeric' => '931', 'symbol' => 'CUC', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'CU', ], @@ -287,6 +419,10 @@ 'alpha' => 'CUP', 'numeric' => '192', 'symbol' => 'CUP', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'CU', ], @@ -295,6 +431,10 @@ 'alpha' => 'CVE', 'numeric' => '132', 'symbol' => 'CVE', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'CV', ], @@ -303,6 +443,10 @@ 'alpha' => 'CZK', 'numeric' => '203', 'symbol' => 'CZK', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'CZ', ], @@ -311,6 +455,10 @@ 'alpha' => 'DJF', 'numeric' => '262', 'symbol' => 'D₣', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'DJ', ], @@ -319,6 +467,10 @@ 'alpha' => 'DKK', 'numeric' => '208', 'symbol' => 'DKK', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'DK', @@ -331,6 +483,10 @@ 'alpha' => 'DOP', 'numeric' => '214', 'symbol' => 'DOP', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'DO', ], @@ -339,6 +495,10 @@ 'alpha' => 'DZD', 'numeric' => '012', 'symbol' => '.د.ج', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'DZ', ], @@ -347,6 +507,10 @@ 'alpha' => 'EGP', 'numeric' => '818', 'symbol' => '.ج.م', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'EG', ], @@ -355,6 +519,10 @@ 'alpha' => 'ERN', 'numeric' => '232', 'symbol' => 'ERN', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'ER', ], @@ -363,6 +531,10 @@ 'alpha' => 'ETB', 'numeric' => '230', 'symbol' => 'ETB', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'ET', ], @@ -371,6 +543,10 @@ 'alpha' => 'EUR', 'numeric' => '978', 'symbol' => '€', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'AD', @@ -415,6 +591,10 @@ 'alpha' => 'FJD', 'numeric' => '242', 'symbol' => 'FJ$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'FJ', ], @@ -423,6 +603,10 @@ 'alpha' => 'FKP', 'numeric' => '238', 'symbol' => 'FKP', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'FK', ], @@ -431,6 +615,10 @@ 'alpha' => 'GBP', 'numeric' => '826', 'symbol' => '£', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'GB', @@ -447,6 +635,10 @@ 'alpha' => 'GEL', 'numeric' => '981', 'symbol' => 'GEL', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'GE', ], @@ -455,6 +647,10 @@ 'alpha' => 'GHS', 'numeric' => '936', 'symbol' => '₵', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'GH', ], @@ -463,6 +659,10 @@ 'alpha' => 'GIP', 'numeric' => '292', 'symbol' => 'GIP', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'GI', ], @@ -471,6 +671,10 @@ 'alpha' => 'GMD', 'numeric' => '270', 'symbol' => 'GMD', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'GM', ], @@ -479,6 +683,10 @@ 'alpha' => 'GNF', 'numeric' => '324', 'symbol' => 'G₣', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'GN', ], @@ -487,6 +695,10 @@ 'alpha' => 'GTQ', 'numeric' => '320', 'symbol' => 'GTQ', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'GT', ], @@ -495,6 +707,10 @@ 'alpha' => 'GYD', 'numeric' => '328', 'symbol' => 'G$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'GY', ], @@ -503,6 +719,10 @@ 'alpha' => 'HKD', 'numeric' => '344', 'symbol' => 'HK$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'HK', ], @@ -511,6 +731,10 @@ 'alpha' => 'HNL', 'numeric' => '340', 'symbol' => 'HNL', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'HN', ], @@ -519,6 +743,10 @@ 'alpha' => 'HRK', 'numeric' => '191', 'symbol' => 'HRK', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'HR', ], @@ -527,6 +755,10 @@ 'alpha' => 'HTG', 'numeric' => '332', 'symbol' => 'HTG', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'HT', ], @@ -535,6 +767,10 @@ 'alpha' => 'HUF', 'numeric' => '348', 'symbol' => 'HUF', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'HU', ], @@ -543,6 +779,10 @@ 'alpha' => 'IDR', 'numeric' => '360', 'symbol' => 'IDR', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'ID', ], @@ -551,6 +791,10 @@ 'alpha' => 'ILS', 'numeric' => '376', 'symbol' => '₪', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'IL', @@ -562,6 +806,10 @@ 'alpha' => 'INR', 'numeric' => '356', 'symbol' => '₹', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'IN', ], @@ -570,6 +818,10 @@ 'alpha' => 'IQD', 'numeric' => '368', 'symbol' => '.د.ع', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 3, 'country' => 'IQ', ], @@ -578,6 +830,10 @@ 'alpha' => 'IRR', 'numeric' => '364', 'symbol' => '﷼', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'IR', ], @@ -586,6 +842,10 @@ 'alpha' => 'ISK', 'numeric' => '352', 'symbol' => 'ISK', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'IS', ], @@ -594,6 +854,10 @@ 'alpha' => 'JMD', 'numeric' => '388', 'symbol' => 'J$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'JM', ], @@ -602,6 +866,10 @@ 'alpha' => 'JOD', 'numeric' => '400', 'symbol' => '.د.أ', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 3, 'country' => 'JO', ], @@ -610,6 +878,10 @@ 'alpha' => 'JPY', 'numeric' => '392', 'symbol' => 'J¥', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'JP', ], @@ -618,6 +890,10 @@ 'alpha' => 'KES', 'numeric' => '404', 'symbol' => 'KES', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'KE', ], @@ -626,6 +902,10 @@ 'alpha' => 'KGS', 'numeric' => '417', 'symbol' => 'KGS', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'KG', ], @@ -634,6 +914,10 @@ 'alpha' => 'KHR', 'numeric' => '116', 'symbol' => '៛', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'KH', ], @@ -642,6 +926,10 @@ 'alpha' => 'KMF', 'numeric' => '174', 'symbol' => 'KMF', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'KM', ], @@ -650,6 +938,10 @@ 'alpha' => 'KPW', 'numeric' => '408', 'symbol' => 'N₩', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'KP', ], @@ -658,6 +950,10 @@ 'alpha' => 'KRW', 'numeric' => '410', 'symbol' => 'S₩', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'KR', ], @@ -666,6 +962,10 @@ 'alpha' => 'KWD', 'numeric' => '414', 'symbol' => '.د.ك', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 3, 'country' => 'KW', ], @@ -674,6 +974,10 @@ 'alpha' => 'KYD', 'numeric' => '136', 'symbol' => 'CI$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'KY', ], @@ -682,6 +986,10 @@ 'alpha' => 'KZT', 'numeric' => '398', 'symbol' => '₸', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'KZ', ], @@ -690,6 +998,10 @@ 'alpha' => 'LAK', 'numeric' => '418', 'symbol' => '₭', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'LA', ], @@ -698,6 +1010,10 @@ 'alpha' => 'LBP', 'numeric' => '422', 'symbol' => '.ل.ل', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'LB', ], @@ -706,6 +1022,10 @@ 'alpha' => 'LKR', 'numeric' => '144', 'symbol' => '₨', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'LK', ], @@ -714,6 +1034,10 @@ 'alpha' => 'LRD', 'numeric' => '430', 'symbol' => 'L$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'LR', ], @@ -722,6 +1046,10 @@ 'alpha' => 'LSL', 'numeric' => '426', 'symbol' => 'LSL', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'LS', ], @@ -730,6 +1058,10 @@ 'alpha' => 'LVL', 'numeric' => '428', 'symbol' => 'LVL', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'LV', ], @@ -738,6 +1070,10 @@ 'alpha' => 'LYD', 'numeric' => '434', 'symbol' => '.د.ل', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 3, 'country' => 'LY', ], @@ -746,6 +1082,10 @@ 'alpha' => 'MAD', 'numeric' => '504', 'symbol' => '.د.م', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'EH', @@ -757,6 +1097,10 @@ 'alpha' => 'MDL', 'numeric' => '498', 'symbol' => 'MDL', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MD', ], @@ -765,6 +1109,10 @@ 'alpha' => 'MGA', 'numeric' => '969', 'symbol' => 'MGA', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MG', ], @@ -773,6 +1121,10 @@ 'alpha' => 'MKD', 'numeric' => '807', 'symbol' => 'MKD', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MK', ], @@ -781,6 +1133,10 @@ 'alpha' => 'MMK', 'numeric' => '104', 'symbol' => 'MMK', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MM', ], @@ -789,6 +1145,10 @@ 'alpha' => 'MNT', 'numeric' => '496', 'symbol' => '₮', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MN', ], @@ -797,6 +1157,10 @@ 'alpha' => 'MOP', 'numeric' => '446', 'symbol' => 'MOP', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MO', ], @@ -805,6 +1169,10 @@ 'alpha' => 'MRU', 'numeric' => '929', 'symbol' => 'MRU', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MR', ], @@ -813,6 +1181,10 @@ 'alpha' => 'MUR', 'numeric' => '480', 'symbol' => 'MUR', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MU', ], @@ -821,6 +1193,10 @@ 'alpha' => 'MVR', 'numeric' => '462', 'symbol' => 'ރ', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MV', ], @@ -829,6 +1205,10 @@ 'alpha' => 'MWK', 'numeric' => '454', 'symbol' => 'MWK', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MW', ], @@ -837,6 +1217,10 @@ 'alpha' => 'MXN', 'numeric' => '484', 'symbol' => 'Mex$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MX', ], @@ -845,6 +1229,10 @@ 'alpha' => 'MYR', 'numeric' => '458', 'symbol' => 'MYR', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MY', ], @@ -853,6 +1241,10 @@ 'alpha' => 'MZN', 'numeric' => '943', 'symbol' => 'MZN', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'MZ', ], @@ -861,6 +1253,10 @@ 'alpha' => 'NAD', 'numeric' => '516', 'symbol' => 'N$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'NA', ], @@ -869,6 +1265,10 @@ 'alpha' => 'NGN', 'numeric' => '566', 'symbol' => '₦', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'NG', ], @@ -877,6 +1277,10 @@ 'alpha' => 'NIO', 'numeric' => '558', 'symbol' => 'C$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'NI', ], @@ -885,6 +1289,10 @@ 'alpha' => 'NOK', 'numeric' => '578', 'symbol' => 'NOK', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'AQ', @@ -898,6 +1306,10 @@ 'alpha' => 'NPR', 'numeric' => '524', 'symbol' => 'रु.', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'NP', ], @@ -906,6 +1318,10 @@ 'alpha' => 'NZD', 'numeric' => '554', 'symbol' => 'NZ$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'CK', @@ -920,6 +1336,10 @@ 'alpha' => 'OMR', 'numeric' => '512', 'symbol' => '.ر.ع', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 3, 'country' => 'OM', ], @@ -928,6 +1348,10 @@ 'alpha' => 'PAB', 'numeric' => '590', 'symbol' => 'PAB', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'PA', ], @@ -936,6 +1360,10 @@ 'alpha' => 'PEN', 'numeric' => '604', 'symbol' => 'PEN', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'PE', ], @@ -944,6 +1372,10 @@ 'alpha' => 'PGK', 'numeric' => '598', 'symbol' => 'PGK', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'PG', ], @@ -952,6 +1384,10 @@ 'alpha' => 'PHP', 'numeric' => '608', 'symbol' => '₱', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'PH', ], @@ -960,6 +1396,10 @@ 'alpha' => 'PKR', 'numeric' => '586', 'symbol' => 'PKR', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'PK', ], @@ -968,6 +1408,10 @@ 'alpha' => 'PLN', 'numeric' => '985', 'symbol' => 'zł', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'PL', ], @@ -976,6 +1420,10 @@ 'alpha' => 'PYG', 'numeric' => '600', 'symbol' => '₲', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'PY', ], @@ -984,6 +1432,10 @@ 'alpha' => 'QAR', 'numeric' => '634', 'symbol' => '.ر.ق', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'QA', ], @@ -992,6 +1444,10 @@ 'alpha' => 'RON', 'numeric' => '946', 'symbol' => 'RON', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'RO', ], @@ -1000,6 +1456,10 @@ 'alpha' => 'RSD', 'numeric' => '941', 'symbol' => 'RSD', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'RS', ], @@ -1008,6 +1468,10 @@ 'alpha' => 'RUB', 'numeric' => '643', 'symbol' => '₽', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'RU', ], @@ -1016,6 +1480,10 @@ 'alpha' => 'RWF', 'numeric' => '646', 'symbol' => 'R₣', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'RW', ], @@ -1024,6 +1492,10 @@ 'alpha' => 'SAR', 'numeric' => '682', 'symbol' => '.ر.س', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SA', ], @@ -1032,6 +1504,10 @@ 'alpha' => 'SBD', 'numeric' => '090', 'symbol' => 'SI$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SB', ], @@ -1040,6 +1516,10 @@ 'alpha' => 'SCR', 'numeric' => '690', 'symbol' => 'SCR', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SC', ], @@ -1048,6 +1528,10 @@ 'alpha' => 'SDG', 'numeric' => '938', 'symbol' => 'ج.س', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SD', ], @@ -1056,6 +1540,10 @@ 'alpha' => 'SEK', 'numeric' => '752', 'symbol' => 'SEK', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SE', ], @@ -1064,6 +1552,10 @@ 'alpha' => 'SGD', 'numeric' => '702', 'symbol' => 'S$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'BN', @@ -1075,6 +1567,10 @@ 'alpha' => 'SHP', 'numeric' => '654', 'symbol' => 'SHP', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SH', ], @@ -1083,6 +1579,10 @@ 'alpha' => 'SLL', 'numeric' => '694', 'symbol' => 'SLL', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SL', ], @@ -1091,6 +1591,10 @@ 'alpha' => 'SLE', 'numeric' => '925', 'symbol' => 'SLE', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SL', ], @@ -1099,6 +1603,10 @@ 'alpha' => 'SOS', 'numeric' => '706', 'symbol' => 'SOS', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SO', ], @@ -1107,6 +1615,10 @@ 'alpha' => 'SRD', 'numeric' => '968', 'symbol' => 'Sur$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SR', ], @@ -1115,6 +1627,10 @@ 'alpha' => 'SSP', 'numeric' => '728', 'symbol' => 'SSP', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SS', ], @@ -1123,6 +1639,10 @@ 'alpha' => 'STN', 'numeric' => '930', 'symbol' => 'STN', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'ST', ], @@ -1131,6 +1651,10 @@ 'alpha' => 'SYP', 'numeric' => '760', 'symbol' => 'ل.س', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SY', ], @@ -1139,6 +1663,10 @@ 'alpha' => 'SZL', 'numeric' => '748', 'symbol' => 'SZL', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'SZ', ], @@ -1147,6 +1675,10 @@ 'alpha' => 'THB', 'numeric' => '764', 'symbol' => '฿', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'TH', ], @@ -1155,6 +1687,10 @@ 'alpha' => 'TJS', 'numeric' => '972', 'symbol' => 'TJS', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'TJ', ], @@ -1163,6 +1699,10 @@ 'alpha' => 'TMT', 'numeric' => '934', 'symbol' => 'TMT', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'TM', ], @@ -1171,6 +1711,10 @@ 'alpha' => 'TND', 'numeric' => '788', 'symbol' => '.د.ت', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 3, 'country' => 'TN', ], @@ -1179,6 +1723,10 @@ 'alpha' => 'TOP', 'numeric' => '776', 'symbol' => 'T$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'TO', ], @@ -1187,6 +1735,10 @@ 'alpha' => 'TRY', 'numeric' => '949', 'symbol' => '₺', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'TR', ], @@ -1195,6 +1747,10 @@ 'alpha' => 'TTD', 'numeric' => '780', 'symbol' => 'TT$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'TT', ], @@ -1203,6 +1759,10 @@ 'alpha' => 'TWD', 'numeric' => '901', 'symbol' => 'NT$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'TW', ], @@ -1211,6 +1771,10 @@ 'alpha' => 'TZS', 'numeric' => '834', 'symbol' => 'TZS', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'TZ', ], @@ -1219,6 +1783,10 @@ 'alpha' => 'UAH', 'numeric' => '980', 'symbol' => '₴', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'UA', ], @@ -1227,6 +1795,10 @@ 'alpha' => 'UGX', 'numeric' => '800', 'symbol' => 'UGX', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'UG', ], @@ -1235,6 +1807,10 @@ 'alpha' => 'USD', 'numeric' => '840', 'symbol' => '$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'AS', @@ -1262,6 +1838,10 @@ 'alpha' => 'UYU', 'numeric' => '858', 'symbol' => '$U', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'UY', ], @@ -1270,6 +1850,10 @@ 'alpha' => 'UZS', 'numeric' => '860', 'symbol' => 'UZS', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'UZ', ], @@ -1278,6 +1862,10 @@ 'alpha' => 'VES', 'numeric' => '928', 'symbol' => 'VES', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'VE', ], @@ -1286,6 +1874,10 @@ 'alpha' => 'VND', 'numeric' => '704', 'symbol' => 'đ', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'VN', ], @@ -1294,6 +1886,10 @@ 'alpha' => 'VUV', 'numeric' => '548', 'symbol' => 'VUV', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => 'VU', ], @@ -1302,6 +1898,10 @@ 'alpha' => 'WST', 'numeric' => '882', 'symbol' => 'WS$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'WS', ], @@ -1310,6 +1910,10 @@ 'alpha' => 'XAF', 'numeric' => '950', 'symbol' => 'XAF', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => [ 'CF', @@ -1325,6 +1929,10 @@ 'alpha' => 'XCD', 'numeric' => '951', 'symbol' => 'EC$', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'AG', @@ -1342,6 +1950,10 @@ 'alpha' => 'XOF', 'numeric' => '952', 'symbol' => 'XOF', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => [ 'BJ', @@ -1359,6 +1971,10 @@ 'alpha' => 'XPF', 'numeric' => '953', 'symbol' => 'XPF', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 0, 'country' => [ 'NC', @@ -1371,6 +1987,10 @@ 'alpha' => 'YER', 'numeric' => '886', 'symbol' => '.ر.ي', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'YE', ], @@ -1379,6 +1999,10 @@ 'alpha' => 'ZAR', 'numeric' => '710', 'symbol' => 'ZAR', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => [ 'NA', @@ -1393,6 +2017,10 @@ 'alpha' => 'ZMW', 'numeric' => '967', 'symbol' => 'ZMW', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'ZM', ], @@ -1401,6 +2029,10 @@ 'alpha' => 'ZWG', 'numeric' => '924', 'symbol' => 'ZWG', + 'position' => 'before', + 'show' => 1, + 'thousands' => ' ', + 'decimals' => '.', 'exp' => 2, 'country' => 'ZW', ], diff --git a/lang/en/global.php b/lang/en/global.php index 1ab8be7..ecdfce1 100644 --- a/lang/en/global.php +++ b/lang/en/global.php @@ -1,15 +1,19 @@ "Add", "add_attribute_help" => "Add a new attribute.", "add_block" => "Add a block", + "add_currency" => "Add a currency", "add_product_help" => "Add a new product.", "additional_fields_main_product_tab" => "Additional fields for the main product tab", "additional_fields_to_products_tab" => "Additional fields", "additional_fields_to_products_tab_help" => "Additional fields for the products tab.", + "after_sum" => "After the amount", "all_products" => "All products", "alternative_text" => "Alternative text", "are_you_sure" => "Are you sure?", "as_filter" => "As a filter", "as_filter_help" => "Use this attribute to filter products in the store catalog.", + "attention" => "Attention", "attribute" => "Attribute", "attribute_help" => "An additional field that expands the possibilities of describing products or orders. Used as a feature and/or filter.", "attribute_icon" => "fa fas fa-paperclip", @@ -26,7 +30,8 @@ "availability" => "Availability", "availability_help" => "Determine the availability status of the product on the site.", "available_currencies" => "Available currencies", - "available_currencies_help" => "List of prices that are available for store operation.", + "available_currencies_help" => "List of currencies that are available for store operation.", + "before_sum" => "Before the sum", "canceled" => "Cancelled.", "caption" => "Caption", "catalog_root" => "Catalog root", @@ -45,6 +50,10 @@ "currencies_help" => "Список доступних валют магазину та їх відношення одна до одної", "currencies_icon" => "fa fa-coins", "currency_conversion" => "Currency Conversion", + "currency_name" => "Currency name", + "currency_name_help" => "Currency name that can be displayed on the frontend if needed sCommerce::getCurrencies(['UAH'])->first()['name']", + "currency_price_configuration" => "Currency settings and price format", + "currency_symbol_help" => "The currency symbol is used to display the price.", "deleted" => "Item deleted.", "deleted_irretrievably" => "If you press the delete button, the item will be irretrievably deleted.", "description" => "sCommerce allows you to manage products and orders on the site.", @@ -83,6 +92,7 @@ "new_attribute" => "New Attribute", "new_product" => "New product", "new_review" => "New review", + "no_data_found" => "No data found", "no_text" => "No text added", "not_available" => "Not available", "not_writable" => "The file ../core/custom/config/seiger/settings/sCommerce.php is not writable.", @@ -97,11 +107,12 @@ "price_configuration" => "Price configuration", "price_decimal_separator" => "Decimal separator for price", "price_decimal_separator_help" => "Sets the separator for the fractional part of the price.", - "price_decimals" => "Number of decimal places in price", + "price_decimals" => "Number of decimal places in the price", "price_decimals_help" => "Sets the number of decimal places in the price. The fractional part is not specified if the value is 0.", "price_help" => "The main price of the product is in the currency of the store.", "price_opt" => "Wholesale price", "price_opt_special" => "Special wholesale price", + "price_position_help" => "The position of the currency symbol when displaying the price.", "price_special" => "Special Price", "price_special_help" => "Special Price of the product is in the currency of the store.", "price_symbol" => "Show symbol", @@ -152,6 +163,7 @@ "sortproducts" => "Sort by position", "sortproducts_help" => "Sorting products by position in a category", "sortproducts_icon" => "fa fa-sort", + "symbol" => "Symbol", "text_block" => "Text block", "technical_parameter_for_delivery" => "technical parameter of the product that can be taken into account during delivery.", "title" => "Commerce", diff --git a/lang/ru/global.php b/lang/ru/global.php index 2bf7b7d..2d26f2f 100644 --- a/lang/ru/global.php +++ b/lang/ru/global.php @@ -1,15 +1,19 @@ "Добавить", "add_attribute_help" => "Добавить новый атрибут.", "add_block" => "Добавить блок", + "add_currency" => "Добавить валюту", "add_product_help" => "Добавить новый товар.", "additional_fields_main_product_tab" => "Дополнительные поля для главного таба продукта", "additional_fields_to_products_tab" => "Дополнительные поля", "additional_fields_to_products_tab_help" => "Дополнительные поля для списка товаров.", + "after_sum" => "После суммы", "all_products" => "Все товары", "alternative_text" => "Альтернативный текст", "are_you_sure" => "Вы уверены?", "as_filter" => "Как фильтр", "as_filter_help" => "Используйте этот атрибут для фильтрации продуктов в каталоге магазина.", + "attention" => "Внимание", "attribute" => "Атрибут", "attribute_help" => "Дополнительное поле расширяет возможности описания продуктов или заказов. Используется как характеристика и/или фильтр.", "attribute_icon" => "fa fas fa-paperclip", @@ -26,7 +30,8 @@ "availability" => "Доступность", "availability_help" => "Определите статус доступности товара на сайте.", "available_currencies" => "Доступные валюты", - "available_currencies_help" => "Список цен, доступных для работы магазина.", + "available_currencies_help" => "Список валют, доступных для работы магазина.", + "before_sum" => "Перед суммой", "canceled" => "Отменено.", "caption" => "Подпись", "catalog_root" => "Корень каталога", @@ -45,6 +50,10 @@ "currencies_help" => "Список доступных валют магазина и их отношение друг к другу.", "currencies_icon" => "fa fa-coins", "currency_conversion" => "Обмен валют", + "currency_name" => "Название валюты", + "currency_name_help" => "Название валюты, которую можно отразить на фронтенд при необходимости sCommerce::getCurrencies(['UAH'])->first()['name']", + "currency_price_configuration" => "Настройка валют и формат цены", + "currency_symbol_help" => "Символ валюты используется для отображения цены.", "deleted" => "Запись удалена.", "deleted_irretrievably" => "Если вы нажмете кнопку удалить, элемент будет удален безвозвратно.", "description" => "sCommerce позволяет осуществлять управление товарами и заказами на сайте.", @@ -83,6 +92,7 @@ "new_attribute" => "Новый атрибут", "new_product" => "Новый товар", "new_review" => "Новый отзыв", + "no_data_found" => "Данные не найдены", "no_text" => "Текст не добавлен", "not_available" => "Нет в наличии", "not_writable" => "Файл ../core/custom/config/seiger/settings/sCommerce.php не доступен для записи.", @@ -97,11 +107,12 @@ "price_configuration" => "Настройка цены", "price_decimal_separator" => "Десятичный разделитель цены", "price_decimal_separator_help" => "Устанавливает разделитель дробной части цены.", - "price_decimals" => "Количество знаков после запятой в цене", + "price_decimals" => "Количество десятичных знаков в цене", "price_decimals_help" => "Задаёт количество десятичных знаков цены. Дробная часть не указывается если значение 0.", "price_help" => "Основная стоимость товара в валюте магазина.", "price_opt" => "Оптовая цена", "price_opt_special" => "Специальная оптовая цена", + "price_position_help" => "Позиция символа валюты при отображении цены.", "price_special" => "Специальная цена", "price_special_help" => "Специальная цена товара в валюте магазина.", "price_symbol" => "Показать символ", @@ -152,6 +163,7 @@ "sortproducts" => "Сортировка по позиции", "sortproducts_help" => "Сортировка товаров по позиции в категории", "sortproducts_icon" => "fa fa-sort", + "symbol" => "Символ", "text_block" => "Текстовый блок", "technical_parameter_for_delivery" => "технический параметр товара, который можно учитывать при доставке.", "title" => "Коммерция", diff --git a/lang/uk/global.php b/lang/uk/global.php index f9f06b2..26c531c 100644 --- a/lang/uk/global.php +++ b/lang/uk/global.php @@ -1,15 +1,19 @@ "Додати", "add_attribute_help" => "Додати новий атрибут.", "add_block" => "Додати блок", + "add_currency" => "Додати валюту", "add_product_help" => "Додати новий товар.", "additional_fields_main_product_tab" => "Додаткові поля для головного таба продукта", "additional_fields_to_products_tab" => "Додаткові поля", "additional_fields_to_products_tab_help" => "Додаткові поля для списка товарів.", + "after_sum" => "Після суми", "all_products" => "Всі товари", "alternative_text" => "Альтернативний текст", "are_you_sure" => "Ви впевнені?", "as_filter" => "Як фільтр", "as_filter_help" => "Використовувати цей атрибут для фільтрації продуктів в каталозі магазину.", + "attention" => "Увага", "attribute" => "Атрибут", "attribute_help" => "Додаткове поле, що розширюе можливості опису продуктів чи замовлень. Використовуюється як характеристика та/або фільтр.", "attribute_icon" => "fa fas fa-paperclip", @@ -26,7 +30,8 @@ "availability" => "Доступність", "availability_help" => "Визначте статус доступності товару на сайті.", "available_currencies" => "Доступні валюти", - "available_currencies_help" => "Список цін, що доступні для роботи магазину.", + "available_currencies_help" => "Список валют, що доступні для роботи магазину.", + "before_sum" => "Перед сумою", "canceled" => "Скасовано.", "caption" => "Підпис", "catalog_root" => "Корінь каталогу", @@ -45,6 +50,10 @@ "currencies_help" => "Список доступних валют магазину та їх відношення одна до одної.", "currencies_icon" => "fa fa-coins", "currency_conversion" => "Конвертація валют", + "currency_name" => "Назва валюти", + "currency_name_help" => "Назва валюти, яку можна відобразити на фронтенд за потреби sCommerce::getCurrencies(['UAH'])->first()['name']", + "currency_price_configuration" => "Налаштування валют та формат ціни", + "currency_symbol_help" => "Символ валюти використовується для відображення ціни.", "deleted" => "Запис видалено.", "deleted_irretrievably" => "Якщо Ви натиснете кнопку видалити, елемент буде видалено безповоротно.", "description" => "sCommerce дозволяє здійснювати управління товарами та замовленнями на сайті.", @@ -83,6 +92,7 @@ "new_attribute" => "Новий атрибут", "new_product" => "Новий товар", "new_review" => "Новий відгук", + "no_data_found" => "Даних не знайдено", "no_text" => "Текст не додано", "not_available" => "Немає в наявності", "not_writable" => "Файл ../core/custom/config/seiger/settings/sCommerce.php не доступний для запису.", @@ -97,11 +107,12 @@ "price_configuration" => "Налаштування ціни", "price_decimal_separator" => "Десятковий роздільник ціни", "price_decimal_separator_help" => "Встановлює роздільник дробової частини ціни.", - "price_decimals" => "Кількість знаків після коми в ціні", + "price_decimals" => "Кількість десяткових знаків в ціні", "price_decimals_help" => "Вказує кількість десяткових знаків ціни. Дробова частина не вказується, якщо значення 0.", "price_help" => "Основна ціна товару в валюті магазину.", "price_opt" => "Оптова ціна", "price_opt_special" => "Спеціальна оптова ціна", + "price_position_help" => "Позиція символа валюти при відображенні ціни.", "price_special" => "Спеціальна ціна", "price_special_help" => "Спеціальна ціна товару в валюті магазину.", "price_symbol" => "Показати символ", @@ -152,6 +163,7 @@ "sortproducts" => "Сортування за позицією", "sortproducts_help" => "Сортування товарів за позицією в категорії ", "sortproducts_icon" => "fa fa-sort", + "symbol" => "Символ", "technical_parameter_for_delivery" => "технічний параметр товару, який можна враховувати під час доставки.", "text_block" => "Текстовий блок", "title" => "Комерція", diff --git a/module/sCommerceModule.php b/module/sCommerceModule.php index dcecc03..6c6b6c2 100644 --- a/module/sCommerceModule.php +++ b/module/sCommerceModule.php @@ -1154,6 +1154,17 @@ | Settings |-------------------------------------------------------------------------- */ + case "getCurrencyItem": + $data['success'] = 0; + $item = request()->string('item')->trim()->value(); + if ($item) { + $currency = sCommerce::getCurrencies([$item]); + if ($currency) { + $data['success'] = 1; + $data['view'] = $sCommerceController->view('partials.settingsCurrencyItem', $currency->first())->render(); + } + } + die(json_encode($data)); case "settings": if (!evo()->hasPermission('settings')) { $back = request()->back ?? '&get=orders'; diff --git a/src/Models/sProduct.php b/src/Models/sProduct.php index 1c021ec..77ea133 100644 --- a/src/Models/sProduct.php +++ b/src/Models/sProduct.php @@ -441,7 +441,7 @@ public function getPriceAttribute(): string */ public function priceTo($currency): string { - return sCommerce::convertPice($this->price_regular, $this->currency, $currency); + return sCommerce::convertPrice($this->price_regular, $this->currency, $currency); } /** @@ -453,7 +453,7 @@ public function priceTo($currency): string */ public function priceToNumber($currency): float { - return sCommerce::convertPiceNumber($this->price_regular, $this->currency, $currency); + return sCommerce::convertPriceNumber($this->price_regular, $this->currency, $currency); } /** @@ -481,7 +481,7 @@ public function getSpecialPriceAttribute(): string */ public function specialPriceTo($currency): string { - return sCommerce::convertPice($this->price_special, $this->currency, $currency); + return sCommerce::convertPrice($this->price_special, $this->currency, $currency); } /** @@ -493,6 +493,6 @@ public function specialPriceTo($currency): string */ public function specialPriceToNumber($currency): float { - return sCommerce::convertPiceNumber($this->price_special, $this->currency, $currency); + return sCommerce::convertPriceNumber($this->price_special, $this->currency, $currency); } } \ No newline at end of file diff --git a/src/sCommerce.php b/src/sCommerce.php index 57a3928..169e565 100644 --- a/src/sCommerce.php +++ b/src/sCommerce.php @@ -134,7 +134,13 @@ public function getCurrencies(null|array $where = null): Collection if (!$this->currencies) { $this->currencies = Cache::remember('currencies', 2629743, function () { $reflector = new \ReflectionClass(self::class); - return include_once str_replace('src/sCommerce.php', 'config/currencies.php', $reflector->getFileName()); + $list = include_once str_replace('src/sCommerce.php', 'config/currencies.php', $reflector->getFileName()); + return $list->map(function ($item) { + if ($this->config('currencies.'.$item['alpha'])) { + $item = array_merge($item, $this->config('currencies.'.$item['alpha'])); + } + return $item; + }); }); } @@ -155,22 +161,27 @@ public function getCurrencies(null|array $where = null): Collection * @param string $currencyTo The currency to convert to. * @return string The converted price as a formatted string. */ - public function convertPice($price, $currencyFrom, $currencyTo): string + public function convertPrice($price, $currencyFrom, $currencyTo): string { + $curr = $this->getCurrencies([$currencyTo])->first(); + $price = number_format( - $this->convertPiceNumber($price, $currencyFrom, $currencyTo), - $this->config('basic.price_decimals', 2), - $this->config('basic.price_decimal_separator', '.'), - $this->config('basic.price_thousands_separator', " ") + $this->convertPriceNumber($price, $currencyFrom, $currencyTo), + ($curr['exp'] ?? 2), + ($curr['decimals'] ?? '.'), + str_replace(' ', ' ', trim($curr['thousands'] ?? ' ')) ); - $symbol = ''; - if ($this->config('basic.price_symbol', 1)) { - $s = $this->getCurrencies([$currencyTo])->first()['symbol']; - if (trim($s) && $s != $currencyTo) { - $symbol = $s; + + if ($curr['show'] ?? 1) { + $symbol = str_replace(' ', ' ', trim($curr['symbol'] ?? ' ')); + if (($curr['position'] ?? 'before') == 'after') { + $price = $price . $symbol; + } else { + $price = $symbol . $price; } } - return $symbol . $price; + + return $price; } /** @@ -182,7 +193,7 @@ public function convertPice($price, $currencyFrom, $currencyTo): string * * @return float The converted price. */ - public function convertPiceNumber($price, $currencyFrom, $currencyTo): float + public function convertPriceNumber($price, $currencyFrom, $currencyTo): float { $rate = config('seiger.settings.sCommerceCurrencies.' . $currencyFrom . '_' . $currencyTo, 1); return floatval($price) * $rate; diff --git a/views/index.blade.php b/views/index.blade.php index d8151e6..9b04060 100644 --- a/views/index.blade.php +++ b/views/index.blade.php @@ -1,6 +1,9 @@ @php use Seiger\sCommerce\Facades\sCommerce; @endphp @extends('manager::template.page') @section('content') +

@lang('sCommerce::global.title')

@@ -41,6 +44,8 @@ + + @include('sCommerce::partials.style') + + @@ -137,15 +142,21 @@ function() { // Flash messages @if (session()->has('success')) - alertify.success("{{session('success')}}"); + alertify.success("{{session('success')}}"); @endif @if (session()->has('error')) - alertify.success("{{session('error')}}"); + alertify.success("{{session('error')}}"); @endif }); // Enable table sorting evo.sortable('.sortable > tbody > tr', {complete:function(e){documentDirty=true}}); + evo.sortable('.sortable > div', {complete:function(e){documentDirty=true}}); + + let niceSelect2 = document.querySelectorAll('.niceSelect2'); + niceSelect2?.forEach(select => { + NiceSelect.bind(document.getElementById(select.id), {searchable: true}); + }); // Image preview document.querySelectorAll("table img").forEach(function (img) { diff --git a/views/partials/settingsCurrencyItem.blade.php b/views/partials/settingsCurrencyItem.blade.php new file mode 100644 index 0000000..909f66e --- /dev/null +++ b/views/partials/settingsCurrencyItem.blade.php @@ -0,0 +1,92 @@ +
+
+ +
+   {{$alpha ?? ''}} ({!!$symbol ?? ''!!}) - {{$name ?? ''}} + +
+
+
+
+
+
+ + +
+
+ +
+
+
+
+ + +
+
+ +
+
+
+
+ + +
+
+ +
+
+
+
+ + +
+
+ +
+
+
+
+ + +
+
+ +
+
+
+
+ + +
+
+ +
+
+
+
+ + +
+
+ +
+
+
+
+
+
+
\ No newline at end of file diff --git a/views/partials/settingsCurrencyPriceConfiguration.blade.php b/views/partials/settingsCurrencyPriceConfiguration.blade.php new file mode 100644 index 0000000..e38d691 --- /dev/null +++ b/views/partials/settingsCurrencyPriceConfiguration.blade.php @@ -0,0 +1,113 @@ +

+ @lang('sCommerce::global.currency_price_configuration') +
+ + @lang('sCommerce::global.add') + +
+

+
+
+ + +
+
+ +
+
+
+
+ + +
+
+
+
+ @foreach(sCommerce::config('basic.available_currencies', []) as $cur) + @include('sCommerce::partials.settingsCurrencyItem', sCommerce::getCurrencies([$cur])->first()) + @endforeach +
+
+
+
+
+ +@push('scripts.bot') + + +@endpush \ No newline at end of file diff --git a/views/partials/style.blade.php b/views/partials/style.blade.php index edd1698..c27df5f 100644 --- a/views/partials/style.blade.php +++ b/views/partials/style.blade.php @@ -15,6 +15,7 @@ .alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok{color:#fff;background-color:#d9534f;border-color:#d9534f;} .alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok-green{color:#fff;background-color:#28a745;border-color:#28a745;} .alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok-info{color:#fff;background-color:#5bc0de;border-color:#5bc0de;} + .alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok-blue{color:#fff;background-color:#0275d8;border-color:#0275d8;} .badge.bg-seigerit{background-color:#0057b8 !important;color:#ffd700;font-size:85%;} .badge.bg-super{vertical-align:super;font-size:60% !important;} .builder .row{display:flex;flex-wrap:wrap;margin-left:-.25rem;margin-right:-.25rem;cursor:default} diff --git a/views/settingsTab.blade.php b/views/settingsTab.blade.php index 85f3aa8..05d44f1 100644 --- a/views/settingsTab.blade.php +++ b/views/settingsTab.blade.php @@ -3,15 +3,15 @@ @if(!is_writable(EVO_CORE_PATH . 'custom/config/seiger/settings/sCommerceCurrencies.php'))@endif
+

+ @lang('sCommerce::global.additional_fields_main_product_tab') +
+ + @lang('global.add') + +
+

-

- @lang('sCommerce::global.additional_fields_main_product_tab') -
- - @lang('global.add') - -
-

@foreach(sCommerce::config('constructor.main_product', []) as $item)
@@ -196,80 +196,7 @@
-

@lang('sCommerce::global.price_configuration')

-
-
- - -
-
- -
-
-
-
- - -
-
- -
-
-
-
- - -
-
- -
-
-
-
- - -
-
- -
-
-
-
- - -
-
- -
-
-
-
- - -
-
- -
-
-
+ @include('sCommerce::partials.settingsCurrencyPriceConfiguration')

@lang('sCommerce::global.management_product_functionality')