Version Description
- woocommerce
- woocommerce 2.0.0
- , .. , php <? <?
Download this release
Release Info
Developer | Saphali |
Plugin | Saphali Woocommerce Russian |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.3.2 to 1.3.0
- count-column.php +2 -2
- go_pro.php +16 -9
- languages/themewoocommerce-ru_RU.po.bak +0 -139
- languages/woocommerce-ru_RU.mo +0 -0
- languages/woocommerce-ru_RU.po +295 -23
- readme.txt +45 -16
- saphali-woocommerce-lite.php +723 -724
count-column.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?
|
2 |
if(isset($_POST['column_count_saphali'])) {
|
3 |
if(empty($_POST["clear"])) {
|
4 |
if(!empty($_POST["column_count_saphali"])) {
|
@@ -9,7 +9,7 @@ if(isset($_POST['column_count_saphali'])) {
|
|
9 |
|
10 |
?>
|
11 |
<form action="" method="POST">
|
12 |
-
Количество колонок: <input value='
|
13 |
<div class='clear'></div>
|
14 |
<input type="submit" class="button alignleft" value="Сохранить"/>
|
15 |
</form>
|
1 |
+
<?
|
2 |
if(isset($_POST['column_count_saphali'])) {
|
3 |
if(empty($_POST["clear"])) {
|
4 |
if(!empty($_POST["column_count_saphali"])) {
|
9 |
|
10 |
?>
|
11 |
<form action="" method="POST">
|
12 |
+
Количество колонок: <input value='<?php echo get_option('column_count_saphali'); ?>' type="text" name="column_count_saphali" />
|
13 |
<div class='clear'></div>
|
14 |
<input type="submit" class="button alignleft" value="Сохранить"/>
|
15 |
</form>
|
go_pro.php
CHANGED
@@ -2,20 +2,27 @@
|
|
2 |
<p><strong>Плагин вносит в магазин следующие дополнения:</strong></p>
|
3 |
<ol>
|
4 |
<li>Улучшенная русская локализация Woocommerce.</li>
|
5 |
-
<li>В общий список валют добавлены — Украинская гривна (грн.), Российский рубль (руб.)
|
6 |
-
<li>Управление полями на странице заказа и на странице профиля. Функция позволяет настроить заказную форму регистрации, чтобы настроить магазин на упрощенение оформления заказа. Вы можете сделать некоторые поля необязательными при регистрации/оформленнии заказа либо удалить их полностью.</li>
|
7 |
-
<li>Управление количеством колонок в каталоге товаров и
|
8 |
</ol>
|
9 |
-
<p>Подробнее на сайте <strong><a href="http://saphali.com/
|
10 |
<p>Мы открыты для ваших предложений. Ваши идеи, предложения и пожелания по улучшению Lite версии пишите на saphali@ukr.net. Возможно, именно Ваше предложение добавит новые возможности. Если вы заметили какие-либо неточности перевода или ошибки, сообщите нам об этом, и в ближайшее время исправления будут добавлены в плагин.</p>
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
<p><strong>Услуги компании Saphali:</strong></p>
|
13 |
<ol>
|
14 |
-
<li>Разработка
|
15 |
-
<li
|
16 |
-
<li
|
17 |
-
<li
|
18 |
-
<li>Создание интернет-магазинов на WordPress.</li>
|
19 |
</ol>
|
20 |
<p>Если вас заинтересовали наши услуги, пишите на saphali@ukr.net</p>');
|
21 |
?>
|
2 |
<p><strong>Плагин вносит в магазин следующие дополнения:</strong></p>
|
3 |
<ol>
|
4 |
<li>Улучшенная русская локализация Woocommerce.</li>
|
5 |
+
<li>В общий список валют добавлены — Украинская гривна (грн.), Российский рубль (руб.), Белорусский рубль (руб.) и Armenian dram (Դրամ)</li>
|
6 |
+
<li>Управление полями на странице оформления заказа и на странице профиля. Функция позволяет настроить заказную форму регистрации, чтобы настроить магазин на упрощенение оформления заказа. Вы можете сделать некоторые поля необязательными при регистрации/оформленнии заказа либо удалить их полностью.</li>
|
7 |
+
<li>Управление количеством колонок в каталоге товаров на странице "Магазин" и в категориях.</li>
|
8 |
</ol>
|
9 |
+
<p>Подробнее на сайте <strong><a href="http://saphali.com/" target="_blank">www.saphali.com</a></strong></p>
|
10 |
<p>Мы открыты для ваших предложений. Ваши идеи, предложения и пожелания по улучшению Lite версии пишите на saphali@ukr.net. Возможно, именно Ваше предложение добавит новые возможности. Если вы заметили какие-либо неточности перевода или ошибки, сообщите нам об этом, и в ближайшее время исправления будут добавлены в плагин.</p>
|
11 |
|
12 |
+
<p><strong>Плагины платежных шлюзов для WooCommerce:</strong></p>
|
13 |
+
QIWI, Приват24, LiqPay, WebMoney, Яндекс.Деньги, Интеркасса, PayPal для России и Украины, Z-payment, ChronoPay, ROBOKASSA.
|
14 |
+
Подробнее на сайте <strong><a href="http://saphali.com/" target="_blank">www.saphali.com</a></strong>
|
15 |
+
|
16 |
+
Профессиональная версия - SAPHALI STANDARD
|
17 |
+
Включает в себя более 15 плагинов: 8 платежных шлюзов Woocommerce и специальные дополнительные функции для Woocommerce.
|
18 |
+
Подробнее: <strong><a href="http://saphali.com/woocommerce-plugins/saphali-standard" target="_blank">http://saphali.com/woocommerce-plugins/saphali-standard</a></strong>
|
19 |
+
|
20 |
<p><strong>Услуги компании Saphali:</strong></p>
|
21 |
<ol>
|
22 |
+
<li>Разработка плагинов для Woocommerce (программируем дополнительный функционал для интернет-магазинов).</li>
|
23 |
+
<li>Разработка платежных шлюзов для WooСommerce.</li>
|
24 |
+
<li>Адаптирование любых бесплатных вордпресс тем под интернет-магазин на Woocommerce.</li>
|
25 |
+
<li>Создание интернет-магазинов на WordPress и WooCommerce (на базе бесплатных вордпресс тем).</li>
|
|
|
26 |
</ol>
|
27 |
<p>Если вас заинтересовали наши услуги, пишите на saphali@ukr.net</p>');
|
28 |
?>
|
languages/themewoocommerce-ru_RU.po.bak
DELETED
@@ -1,139 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: WooCommerce theme v1.0.0\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2012-11-19 07:29+0200\n"
|
7 |
-
"Last-Translator: \n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
14 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
15 |
-
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
16 |
-
"X-Poedit-Basepath: ../\n"
|
17 |
-
"X-Textdomain-Support: yes\n"
|
18 |
-
"Language: ru\n"
|
19 |
-
"X-Generator: Poedit 1.5.4\n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
|
22 |
-
# @ woocommerce
|
23 |
-
#: functions.php:40
|
24 |
-
msgid "Ukrainian hryvnia ( grn.)"
|
25 |
-
msgstr "Украинская гривна ( грн.)"
|
26 |
-
|
27 |
-
msgid "Product Custom Fild"
|
28 |
-
msgstr "Произвольное поле товарной записи"
|
29 |
-
|
30 |
-
msgid "WC Sku"
|
31 |
-
msgstr "WC Артикул"
|
32 |
-
|
33 |
-
msgid "Custom Fild"
|
34 |
-
msgstr "Произвольное поле"
|
35 |
-
|
36 |
-
# @ woocommerce
|
37 |
-
#: functions.php:40
|
38 |
-
msgid "Russian ruble ( rub.)"
|
39 |
-
msgstr "Русский рубль ( руб.)"
|
40 |
-
|
41 |
-
# @ woocommerce
|
42 |
-
#: functions.php:40
|
43 |
-
msgid "Belarusian ruble ( Br.)"
|
44 |
-
msgstr "Белорусский рубль ( Br.)"
|
45 |
-
|
46 |
-
# @ woocommerce
|
47 |
-
#: functions.php:40
|
48 |
-
msgid ""
|
49 |
-
"Log Qiwi events, such as IPN requests, inside <code>woocommerce/logs/qiwi."
|
50 |
-
"txt</code>"
|
51 |
-
msgstr ""
|
52 |
-
"Журнал событий, таких как запросы/ответы на/от сервера Qiwi, внутри "
|
53 |
-
"документа <code>woocommerce/logs/qiwi.txt</code>"
|
54 |
-
|
55 |
-
# @ woocommerce
|
56 |
-
#: functions.php:40
|
57 |
-
msgid ""
|
58 |
-
"Log LiqPay events, such as IPN requests, inside <code>woocommerce/logs/"
|
59 |
-
"liqpay.txt</code>"
|
60 |
-
msgstr ""
|
61 |
-
"Журнал событий, таких как запросы/ответы на/от сервера LiqPay, внутри "
|
62 |
-
"документа <code>woocommerce/logs/liqpay.txt</code>"
|
63 |
-
|
64 |
-
# @ woocommerce
|
65 |
-
#: functions.php:40
|
66 |
-
msgid ""
|
67 |
-
"Log Privat24 events, such as IPN requests, inside <code>woocommerce/logs/"
|
68 |
-
"privat24.txt</code>"
|
69 |
-
msgstr ""
|
70 |
-
"Журнал событий, таких как запросы/ответы на/от сервера Privat24, внутри "
|
71 |
-
"документа <code>woocommerce/logs/privat24.txt</code>"
|
72 |
-
|
73 |
-
# @ woocommerce
|
74 |
-
#: functions.php:40
|
75 |
-
msgid ""
|
76 |
-
"Log WebMoney events, such as IPN requests, inside <code>woocommerce/logs/"
|
77 |
-
"webmoney.txt</code>"
|
78 |
-
msgstr ""
|
79 |
-
"Журнал событий, таких как запросы/ответы на/от сервера WebMoney, внутри "
|
80 |
-
"документа <code>woocommerce/logs/webmoney.txt</code>"
|
81 |
-
|
82 |
-
# @ woocommerce
|
83 |
-
#: functions.php:40
|
84 |
-
msgid "Debug Log"
|
85 |
-
msgstr "Журнал отладки"
|
86 |
-
|
87 |
-
# @ woocommerce
|
88 |
-
#: functions.php:40
|
89 |
-
msgid "Enable logging"
|
90 |
-
msgstr "Включить журналирование"
|
91 |
-
|
92 |
-
# @ woocommerce
|
93 |
-
#: functions.php:40
|
94 |
-
msgid ""
|
95 |
-
"Pay via Qiwi; you can pay with your credit card if you don't have a Qiwi "
|
96 |
-
"account or terminal."
|
97 |
-
msgstr ""
|
98 |
-
"Заплатить через Qiwi. Вы также можете заплатить пластиковой картой или "
|
99 |
-
"через терминал."
|
100 |
-
|
101 |
-
# @ woocommerce
|
102 |
-
#: functions.php:40
|
103 |
-
msgid ""
|
104 |
-
"Pay via LiqPay; you can pay with your credit card if you don't have a LiqPay "
|
105 |
-
"account or terminal."
|
106 |
-
msgstr ""
|
107 |
-
"Заплатить через LiqPay. Вы можете заплатить пластиковой картой, если у вас "
|
108 |
-
"нет LiqPay аккаунта или через терминал."
|
109 |
-
|
110 |
-
msgid ""
|
111 |
-
"Thank you for your order, please click the button below to pay with LiqPay."
|
112 |
-
msgstr ""
|
113 |
-
"Спасибо за заказ, пожалуйста, нажмите на кнопку внизу, чтобы оплатить при "
|
114 |
-
"помощи LiqPay."
|
115 |
-
|
116 |
-
msgid ""
|
117 |
-
"Thank you for your order, please click the button below to pay with Qiwi."
|
118 |
-
msgstr ""
|
119 |
-
"Спасибо за заказ, пожалуйста, нажмите на кнопку внизу, чтобы оплатить при "
|
120 |
-
"помощи Qiwi."
|
121 |
-
|
122 |
-
msgid ""
|
123 |
-
"Thank you for your order, please click the button below to pay with Privat24."
|
124 |
-
msgstr ""
|
125 |
-
"Спасибо за заказ, пожалуйста, нажмите на кнопку внизу, чтобы оплатить при "
|
126 |
-
"помощи Privat24."
|
127 |
-
|
128 |
-
msgid ""
|
129 |
-
"Thank you for your order, please click the button below to pay with WebMoney."
|
130 |
-
msgstr ""
|
131 |
-
"Спасибо за заказ, пожалуйста, нажмите на кнопку внизу, чтобы оплатить при "
|
132 |
-
"помощи WebMoney."
|
133 |
-
|
134 |
-
msgid ""
|
135 |
-
"Thank you for your order, please click the button below to pay with "
|
136 |
-
"Robokassa."
|
137 |
-
msgstr ""
|
138 |
-
"Спасибо за заказ, пожалуйста, нажмите на кнопку внизу, чтобы оплатить при "
|
139 |
-
"помощи Robokassa."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/woocommerce-ru_RU.mo
CHANGED
Binary file
|
languages/woocommerce-ru_RU.po
CHANGED
@@ -3,21 +3,21 @@ msgstr ""
|
|
3 |
"Project-Id-Version: WooCommerce theme v1.0.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date:
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=4; plural=n==1 ? 1 : n%10>=2 && n%10<=4 && (n%100<10 "
|
13 |
-
"|| n%100>=20) ? 2 : 3 ;\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
|
|
|
|
15 |
"X-Poedit-KeywordsList: __;_e;_x;_n;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
17 |
"X-Poedit-Basepath: ../\n"
|
18 |
"X-Textdomain-Support: yes\n"
|
19 |
"Language: ru\n"
|
20 |
-
"X-Generator: Poedit 1.5.
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
|
23 |
# @ woocommerce
|
@@ -157,6 +157,26 @@ msgstr "Сортировать по дате"
|
|
157 |
msgid "Sort by price"
|
158 |
msgstr "Сортировать по цене"
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
# @ woocommerce
|
161 |
#: admin/settings/settings-init.php:545 templates/loop/sorting.php:13
|
162 |
msgid "Enable guest checkout (no account required)"
|
@@ -172,6 +192,22 @@ msgstr "Использовать безопасное соединение пр
|
|
172 |
msgid "Registration"
|
173 |
msgstr "Регистрация"
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
# @ woocommerce
|
176 |
#: admin/settings/settings-init.php:545 templates/loop/sorting.php:13
|
177 |
msgid "Allow registration on the checkout page"
|
@@ -237,15 +273,49 @@ msgstr "Имя пользователя или e-mail"
|
|
237 |
#: admin/woocommerce-admin-users.php:133 admin/woocommerce-admin-users.php:182
|
238 |
#: classes/class-wc-countries.php:899 classes/class-wc-countries.php:900
|
239 |
#: classes/class-wc-countries.php:975
|
|
|
|
|
|
|
240 |
msgid "State/County"
|
241 |
msgstr "Область, Район"
|
242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
# @ woocommerce
|
244 |
#: classes/class-wc-countries.php:976
|
245 |
msgctxt "placeholder"
|
246 |
msgid "State/County"
|
247 |
msgstr "Область, Район"
|
248 |
|
|
|
|
|
|
|
|
|
249 |
# @ woocommerce
|
250 |
# @ woocommerce
|
251 |
#: templates/checkout/form-shipping.php:25
|
@@ -342,16 +412,6 @@ msgstr "Налоги за месяц"
|
|
342 |
msgid "items"
|
343 |
msgstr "позиций"
|
344 |
|
345 |
-
# @ woocommerce
|
346 |
-
#: admin/woocommerce-admin-reports.php:369
|
347 |
-
msgid "Discounts used"
|
348 |
-
msgstr "Использованы купоны"
|
349 |
-
|
350 |
-
# @ woocommerce
|
351 |
-
#: admin/woocommerce-admin-reports.php:375
|
352 |
-
msgid "Total shipping costs"
|
353 |
-
msgstr "Всего расходы по доставке"
|
354 |
-
|
355 |
# @ woocommerce
|
356 |
#: admin/woocommerce-admin-reports.php:1149
|
357 |
#, php-format
|
@@ -422,11 +482,6 @@ msgstr "Активировать звездный рейтинг на форме
|
|
422 |
msgid "Ratings are required to leave a review"
|
423 |
msgstr "Чтобы оставить отзыв, покупателю потребуется указать рейтинг товара"
|
424 |
|
425 |
-
# @ woocommerce
|
426 |
-
#: admin/settings/settings-init.php:682
|
427 |
-
msgid "Show \"verified owner\" label for customer reviews"
|
428 |
-
msgstr ""
|
429 |
-
|
430 |
# @ woocommerce
|
431 |
#: admin/settings/settings-init.php:692
|
432 |
msgid "The following options affect how prices are displayed on the frontend."
|
@@ -599,10 +654,9 @@ msgstr "тому назад"
|
|
599 |
|
600 |
msgid "Product"
|
601 |
msgid_plural "Products"
|
602 |
-
msgstr[0] "
|
603 |
-
msgstr[1] "
|
604 |
-
msgstr[2] "
|
605 |
-
msgstr[3] "Товары"
|
606 |
|
607 |
msgid ""
|
608 |
"Order <mark class=\"order-number\">%s</mark> made on <mark class=\"order-date"
|
@@ -684,3 +738,221 @@ msgstr "Введите значение, например, 2.99"
|
|
684 |
#: admin/settings/settings-init.php:364
|
685 |
msgid "Terms page ID"
|
686 |
msgstr "Страница правил и условий"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"Project-Id-Version: WooCommerce theme v1.0.0\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2013-02-20 19:38+0200\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
12 |
"X-Poedit-SourceCharset: UTF-8\n"
|
13 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11) ? 0 : ((n%10>=2 && n"
|
14 |
+
"%10<=4 && (n%100<10 || n%100>=20)) ? 1 : 2);\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_x;_n;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
17 |
"X-Poedit-Basepath: ../\n"
|
18 |
"X-Textdomain-Support: yes\n"
|
19 |
"Language: ru\n"
|
20 |
+
"X-Generator: Poedit 1.5.5\n"
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
|
23 |
# @ woocommerce
|
157 |
msgid "Sort by price"
|
158 |
msgstr "Сортировать по цене"
|
159 |
|
160 |
+
# @ woocommerce
|
161 |
+
#: admin/settings/settings-init.php:545 templates/loop/sorting.php:13
|
162 |
+
msgid "Sort by price - low to high"
|
163 |
+
msgstr "Сортировать по цене (возрастание)"
|
164 |
+
|
165 |
+
# @ woocommerce
|
166 |
+
#: admin/settings/settings-init.php:545 templates/loop/sorting.php:13
|
167 |
+
msgid "Sort by price - high to low"
|
168 |
+
msgstr "Сортировать по цене (убывание)"
|
169 |
+
|
170 |
+
# @ woocommerce
|
171 |
+
#: admin/settings/settings-init.php:545 templates/loop/sorting.php:13
|
172 |
+
msgid "Sort by price: low to high"
|
173 |
+
msgstr "Сортировать по цене: возрастание"
|
174 |
+
|
175 |
+
# @ woocommerce
|
176 |
+
#: admin/settings/settings-init.php:545 templates/loop/sorting.php:13
|
177 |
+
msgid "Sort by price: high to low"
|
178 |
+
msgstr "Сортировать по цене: убывание"
|
179 |
+
|
180 |
# @ woocommerce
|
181 |
#: admin/settings/settings-init.php:545 templates/loop/sorting.php:13
|
182 |
msgid "Enable guest checkout (no account required)"
|
192 |
msgid "Registration"
|
193 |
msgstr "Регистрация"
|
194 |
|
195 |
+
#: templates/loop/result-count.php:28
|
196 |
+
msgid "Showing the single result"
|
197 |
+
msgstr "Показан один результат"
|
198 |
+
|
199 |
+
# @ woocommerce
|
200 |
+
#: templates/loop/result-count.php:30
|
201 |
+
#, php-format
|
202 |
+
msgid "Showing all %d results"
|
203 |
+
msgstr "Показаны все товары. Всего товаров: %d"
|
204 |
+
|
205 |
+
#: templates/loop/result-count.php:32
|
206 |
+
#, php-format
|
207 |
+
msgctxt "%1$d = first, %2$d = last, %3$d = total"
|
208 |
+
msgid "Showing %1$d–%2$d of %3$d results"
|
209 |
+
msgstr "Показаны товары с %1$d по %2$d из %3$d"
|
210 |
+
|
211 |
# @ woocommerce
|
212 |
#: admin/settings/settings-init.php:545 templates/loop/sorting.php:13
|
213 |
msgid "Allow registration on the checkout page"
|
273 |
#: admin/woocommerce-admin-users.php:133 admin/woocommerce-admin-users.php:182
|
274 |
#: classes/class-wc-countries.php:899 classes/class-wc-countries.php:900
|
275 |
#: classes/class-wc-countries.php:975
|
276 |
+
msgid "State / County"
|
277 |
+
msgstr "Область, Район"
|
278 |
+
|
279 |
msgid "State/County"
|
280 |
msgstr "Область, Район"
|
281 |
|
282 |
+
msgid "Apartment, suite, unit etc. (optional)"
|
283 |
+
msgstr "Квартира, комната, блок и т.д. (необязательно)"
|
284 |
+
|
285 |
+
msgid "Street address"
|
286 |
+
msgstr "Ваш адрес"
|
287 |
+
|
288 |
+
msgid "required"
|
289 |
+
msgstr "обязательно"
|
290 |
+
|
291 |
+
# @ woocommerce
|
292 |
+
#: admin/woocommerce-admin-users.php:171 admin/woocommerce-admin-users.php:220
|
293 |
+
#: admin/post-types/writepanels/writepanel-order_data.php:168
|
294 |
+
#: admin/post-types/writepanels/writepanel-order_data.php:258
|
295 |
+
#: classes/class-wc-countries.php:885 classes/class-wc-countries.php:886
|
296 |
+
#: templates/cart/shipping-calculator.php:69
|
297 |
+
msgid "Postcode / Zip"
|
298 |
+
msgstr "Почтовый индекс"
|
299 |
+
|
300 |
+
# @ woocommerce
|
301 |
+
#: admin/woocommerce-admin-users.php:167 admin/woocommerce-admin-users.php:216
|
302 |
+
#: admin/post-types/writepanels/writepanel-order_data.php:164
|
303 |
+
#: admin/post-types/writepanels/writepanel-order_data.php:254
|
304 |
+
#: admin/settings/settings-tax-rates.php:42
|
305 |
+
#: admin/settings/settings-tax-rates.php:182
|
306 |
+
msgid "Town / City"
|
307 |
+
msgstr "Город"
|
308 |
+
|
309 |
# @ woocommerce
|
310 |
#: classes/class-wc-countries.php:976
|
311 |
msgctxt "placeholder"
|
312 |
msgid "State/County"
|
313 |
msgstr "Область, Район"
|
314 |
|
315 |
+
msgctxt "placeholder"
|
316 |
+
msgid "State / County"
|
317 |
+
msgstr "Область, Район"
|
318 |
+
|
319 |
# @ woocommerce
|
320 |
# @ woocommerce
|
321 |
#: templates/checkout/form-shipping.php:25
|
412 |
msgid "items"
|
413 |
msgstr "позиций"
|
414 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
# @ woocommerce
|
416 |
#: admin/woocommerce-admin-reports.php:1149
|
417 |
#, php-format
|
482 |
msgid "Ratings are required to leave a review"
|
483 |
msgstr "Чтобы оставить отзыв, покупателю потребуется указать рейтинг товара"
|
484 |
|
|
|
|
|
|
|
|
|
|
|
485 |
# @ woocommerce
|
486 |
#: admin/settings/settings-init.php:692
|
487 |
msgid "The following options affect how prices are displayed on the frontend."
|
654 |
|
655 |
msgid "Product"
|
656 |
msgid_plural "Products"
|
657 |
+
msgstr[0] "Товар"
|
658 |
+
msgstr[1] "Товара"
|
659 |
+
msgstr[2] "Товаров"
|
|
|
660 |
|
661 |
msgid ""
|
662 |
"Order <mark class=\"order-number\">%s</mark> made on <mark class=\"order-date"
|
738 |
#: admin/settings/settings-init.php:364
|
739 |
msgid "Terms page ID"
|
740 |
msgstr "Страница правил и условий"
|
741 |
+
|
742 |
+
# @ woocommerce
|
743 |
+
#: admin/settings/settings-init.php:364
|
744 |
+
msgid "Show \"verified owner\" label for customer reviews"
|
745 |
+
msgstr "Пометить меткой \"владелец товара\" в отзывах покупателей"
|
746 |
+
|
747 |
+
# @ woocommerce
|
748 |
+
#: templates/single-product/review.php:29
|
749 |
+
msgid "verified owner"
|
750 |
+
msgstr "владелец товара"
|
751 |
+
|
752 |
+
# @ woocommerce
|
753 |
+
#: admin/woocommerce-admin-reports.php:606
|
754 |
+
#: admin/woocommerce-admin-reports.php:941
|
755 |
+
#: admin/woocommerce-admin-reports.php:1038
|
756 |
+
msgid "To:"
|
757 |
+
msgstr "До:"
|
758 |
+
|
759 |
+
# @ woocommerce
|
760 |
+
#: admin/woocommerce-admin-init.php:287
|
761 |
+
msgid "Enter a name for the new attribute term:"
|
762 |
+
msgstr "Введите название для нового атрибута:"
|
763 |
+
|
764 |
+
# @ woocommerce
|
765 |
+
#: admin/woocommerce-admin-init.php:571
|
766 |
+
msgid "Order notes"
|
767 |
+
msgstr "Заметки заказа"
|
768 |
+
|
769 |
+
# @ woocommerce
|
770 |
+
#: admin/woocommerce-admin-reports.php:369
|
771 |
+
msgid "Discounts used"
|
772 |
+
msgstr "Использованые скидки"
|
773 |
+
|
774 |
+
# @ woocommerce
|
775 |
+
#: admin/woocommerce-admin-reports.php:375
|
776 |
+
msgid "Total shipping costs"
|
777 |
+
msgstr "Всего за доставку"
|
778 |
+
|
779 |
+
# @ woocommerce
|
780 |
+
#: admin/woocommerce-admin-reports.php:1733
|
781 |
+
msgid "Total taxes for year"
|
782 |
+
msgstr "Всего налогов за год"
|
783 |
+
|
784 |
+
# @ woocommerce
|
785 |
+
#: admin/woocommerce-admin-reports.php:1744
|
786 |
+
msgid "Total product taxes for year"
|
787 |
+
msgstr "Всего нологов на товар за год"
|
788 |
+
|
789 |
+
# @ woocommerce
|
790 |
+
#: admin/woocommerce-admin-reports.php:1755
|
791 |
+
msgid "Total shipping tax for year"
|
792 |
+
msgstr "Всего налогов за доставку за год"
|
793 |
+
|
794 |
+
# @ woocommerce
|
795 |
+
#: admin/woocommerce-admin-reports.php:1771
|
796 |
+
msgid "Total Sales"
|
797 |
+
msgstr "Всего за распродажу"
|
798 |
+
|
799 |
+
# @ woocommerce
|
800 |
+
#: admin/woocommerce-admin-reports.php:1771
|
801 |
+
msgid "This is the sum of the 'Order Total' field within your orders."
|
802 |
+
msgstr "Это сумма поля 'Итого' заказов в год"
|
803 |
+
|
804 |
+
# @ woocommerce
|
805 |
+
#: admin/woocommerce-admin-reports.php:1772
|
806 |
+
msgid "Total Shipping"
|
807 |
+
msgstr "Всего за доставку"
|
808 |
+
|
809 |
+
# @ woocommerce
|
810 |
+
#: admin/woocommerce-admin-reports.php:1772
|
811 |
+
msgid "This is the sum of the 'Shipping Total' field within your orders."
|
812 |
+
msgstr "Это сумма поля 'Всего за доставку' заказов в год"
|
813 |
+
|
814 |
+
# @ woocommerce
|
815 |
+
#: admin/woocommerce-admin-reports.php:1773
|
816 |
+
msgid "Total Product Taxes"
|
817 |
+
msgstr "Сумма налога на товар"
|
818 |
+
|
819 |
+
# @ woocommerce
|
820 |
+
#: admin/woocommerce-admin-reports.php:1773
|
821 |
+
msgid "This is the sum of the 'Cart Tax' field within your orders."
|
822 |
+
msgstr "Это сумма поля 'Нагог в корзине' на странице корзины заказов за год"
|
823 |
+
|
824 |
+
# @ woocommerce
|
825 |
+
#: admin/woocommerce-admin-reports.php:1774
|
826 |
+
msgid "Total Shipping Taxes"
|
827 |
+
msgstr "Сумма налога на доставку"
|
828 |
+
|
829 |
+
# @ woocommerce
|
830 |
+
#: admin/woocommerce-admin-reports.php:1774
|
831 |
+
msgid "This is the sum of the 'Shipping Tax' field within your orders."
|
832 |
+
msgstr "Это сумма поля 'Налог на доставку' за год"
|
833 |
+
|
834 |
+
# @ woocommerce
|
835 |
+
#: admin/woocommerce-admin-reports.php:1775
|
836 |
+
msgid "Total Taxes"
|
837 |
+
msgstr "Всего налогов"
|
838 |
+
|
839 |
+
# @ woocommerce
|
840 |
+
#: admin/woocommerce-admin-reports.php:1775
|
841 |
+
msgid ""
|
842 |
+
"This is the sum of the 'Cart Tax' and 'Shipping Tax' fields within your "
|
843 |
+
"orders."
|
844 |
+
msgstr "Это сумма полей 'Налог в корзине' и 'Налог на доставку' за год"
|
845 |
+
|
846 |
+
# @ woocommerce
|
847 |
+
#: admin/woocommerce-admin-reports.php:1776
|
848 |
+
msgid "Net profit"
|
849 |
+
msgstr "Доход"
|
850 |
+
|
851 |
+
# @ woocommerce
|
852 |
+
#: admin/woocommerce-admin-reports.php:1776
|
853 |
+
msgid "Total sales minus shipping and tax."
|
854 |
+
msgstr ""
|
855 |
+
|
856 |
+
# @ woocommerce
|
857 |
+
#: admin/woocommerce-admin-reports.php:1819
|
858 |
+
msgid "Toggle tax rows"
|
859 |
+
msgstr ""
|
860 |
+
|
861 |
+
# @ woocommerce
|
862 |
+
#: admin/woocommerce-admin-functions.php:299
|
863 |
+
#: admin/woocommerce-admin-functions.php:300
|
864 |
+
msgid "Mark processing"
|
865 |
+
msgstr "Изменить статус на обработка"
|
866 |
+
|
867 |
+
# @ woocommerce
|
868 |
+
#: admin/woocommerce-admin-functions.php:302
|
869 |
+
#: admin/woocommerce-admin-functions.php:303
|
870 |
+
msgid "Mark completed"
|
871 |
+
msgstr "Изменить статус на выполнен"
|
872 |
+
|
873 |
+
# @ default
|
874 |
+
msgid "Order status changed."
|
875 |
+
msgid_plural "%s order statuses changed."
|
876 |
+
msgstr[0] "Статус заказа изменен."
|
877 |
+
msgstr[1] "%s cтатуса заказа изменены."
|
878 |
+
msgstr[2] "%s статусов заказа изменены."
|
879 |
+
|
880 |
+
# @ woocommerce
|
881 |
+
#: admin/woocommerce-admin-functions.php:334
|
882 |
+
msgid "Order status changed by bulk edit:"
|
883 |
+
msgstr "Статус заказа изменен в массовом редактивании:"
|
884 |
+
|
885 |
+
# @ woocommerce
|
886 |
+
#: admin/woocommerce-admin-functions.php:334
|
887 |
+
msgid "Clear selection"
|
888 |
+
msgstr "Отменить выбор"
|
889 |
+
|
890 |
+
# @ woocommerce
|
891 |
+
#: admin/woocommerce-admin-functions.php:334
|
892 |
+
msgid "Linked Products"
|
893 |
+
msgstr "Сопутствующая продукция"
|
894 |
+
|
895 |
+
# @ woocommerce
|
896 |
+
#: admin/woocommerce-admin-functions.php:334
|
897 |
+
msgid "Save attributes"
|
898 |
+
msgstr "Сохранить свойства"
|
899 |
+
|
900 |
+
# @ woocommerce
|
901 |
+
#: admin/woocommerce-admin-functions.php:334
|
902 |
+
msgid "Choose a file"
|
903 |
+
msgstr "Выберите файл"
|
904 |
+
|
905 |
+
# @ woocommerce
|
906 |
+
#: admin/post-types/writepanels/variation-admin-html.php:133
|
907 |
+
msgid "File paths:"
|
908 |
+
msgstr "Ссылки/Пути к файлам:"
|
909 |
+
|
910 |
+
# @ woocommerce
|
911 |
+
#: admin/post-types/writepanels/variation-admin-html.php:140
|
912 |
+
msgid "Download Expiry:"
|
913 |
+
msgstr "Срок действия загрузки:"
|
914 |
+
|
915 |
+
# @ woocommerce
|
916 |
+
#: admin/post-types/writepanels/variation-admin-html.php:123
|
917 |
+
msgid "Tax class:"
|
918 |
+
msgstr "Класс налога:"
|
919 |
+
|
920 |
+
# @ woocommerce
|
921 |
+
#: admin/post-types/writepanels/variation-admin-html.php:70
|
922 |
+
msgid "Cancel schedule"
|
923 |
+
msgstr "Отменить расписание"
|
924 |
+
|
925 |
+
# @ woocommerce
|
926 |
+
msgid "Sort by newness"
|
927 |
+
msgstr "Сортировать по новизне"
|
928 |
+
|
929 |
+
# @ woocommerce
|
930 |
+
msgid "Sort by popularity"
|
931 |
+
msgstr "Сортировать по популярности"
|
932 |
+
|
933 |
+
# @ woocommerce
|
934 |
+
msgid "Sort by average rating"
|
935 |
+
msgstr "Сортировать по рейтингу"
|
936 |
+
|
937 |
+
# @ woocommerce
|
938 |
+
msgid "Coupon code already applied!"
|
939 |
+
msgstr "Код купона уже применяется!"
|
940 |
+
|
941 |
+
# @ woocommerce
|
942 |
+
#: classes/class-wc-cart.php:1764
|
943 |
+
msgid "Coupon code applied successfully."
|
944 |
+
msgstr "Скидка успешно добавлена."
|
945 |
+
|
946 |
+
# @ woocommerce
|
947 |
+
#: woocommerce-ajax.php:100 shortcodes/shortcode-cart.php:46
|
948 |
+
msgid "Please enter a coupon code."
|
949 |
+
msgstr "Пожалуйста, введите код купона."
|
950 |
+
|
951 |
+
# @ woocommerce
|
952 |
+
#: woocommerce-template.php:229
|
953 |
+
#, php-format
|
954 |
+
msgid "Search Results: “%s”"
|
955 |
+
msgstr "Результаты поиска: “%s”"
|
956 |
+
|
957 |
+
msgid "Reviews (%d)"
|
958 |
+
msgstr "Отзывы (%d)"
|
readme.txt
CHANGED
@@ -5,29 +5,48 @@ Plugin URI: http://saphali.com/saphali-woocommerce-plugin-wordpress
|
|
5 |
Donate link: http://saphali.com/
|
6 |
Tags: woocommerce, woo commerce russian, russian ruble, ukrainian hryvnia, mod, manadger filds checkout
|
7 |
Requires at least: 3.3 or higher
|
8 |
-
Tested up to: 3.5
|
9 |
-
Stable tag: 1.
|
10 |
-
Version: 1.
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
14 |
-
Набор дополнений к
|
|
|
15 |
|
16 |
== Description ==
|
17 |
|
18 |
-
|
|
|
19 |
|
20 |
-
|
|
|
|
|
|
|
|
|
21 |
|
22 |
= Особенности =
|
23 |
|
24 |
-
* Улучшенная русская локализация Woocommerce (
|
25 |
-
* В общий список валют добавлены — Украинская гривна (грн.), Русский рубль (руб.)
|
26 |
-
* Управление полями на странице заказа и на странице профиля. Функция позволяет настроить заказную форму
|
27 |
-
* Управление количеством колонок в каталоге товаров и
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
== Installation ==
|
33 |
|
@@ -37,14 +56,19 @@ Saphali - set of additions to Woocommerce.
|
|
37 |
|
38 |
== Screenshots ==
|
39 |
|
40 |
-
1. Улучшенная русская локализация Woocommerce. В общий список валют добавлены — Украинская гривна (грн.), Русский рубль (руб.)
|
41 |
2. Управление полями на странице заказа и на странице профиля. Функция позволяет настроить заказную форму регистрации, чтобы настроить магазин на упрощенение оформления заказа. Вы можете сделать некоторые поля необязательными при регистрации/оформленнии заказа либо удалить их полностью.
|
42 |
3. Управление количеством колонок в каталоге товаров и рубриках.
|
43 |
|
44 |
== Changelog ==
|
45 |
|
|
|
|
|
|
|
|
|
|
|
46 |
= 1.2.3.2 =
|
47 |
-
*
|
48 |
|
49 |
= 1.2.3.1 =
|
50 |
* Ошибка загрузки в repository
|
@@ -69,7 +93,7 @@ Saphali - set of additions to Woocommerce.
|
|
69 |
* Исправлена ошибка в управлении полями на странице заказа и на странице профиля.
|
70 |
|
71 |
= 1.0 =
|
72 |
-
* Улучшенная русская локализация Woocommerce (корректировка перевода
|
73 |
* В общий список валют добавлены — Украинская гривна (грн.), Русский рубль (руб.) и Белорусский рубль (руб.)
|
74 |
* Управление полями на странице заказа и на странице профиля. Функция позволяет настроить заказную форму регистрации, чтобы настроить магазин на упрощенение оформления заказа. Вы можете сделать некоторые поля необязательными при регистрации/оформленнии заказа либо удалить их полностью.
|
75 |
* Управление количеством колонок в каталоге товаров и рубриках.
|
@@ -88,8 +112,13 @@ Saphali - set of additions to Woocommerce.
|
|
88 |
|
89 |
== Upgrade Notice ==
|
90 |
|
|
|
|
|
|
|
|
|
|
|
91 |
= 1.2.3.2 =
|
92 |
-
*
|
93 |
|
94 |
= 1.2.3 =
|
95 |
* На странице управления дополнительными полями и полями доставки исправлена ошибка добавления полей.
|
5 |
Donate link: http://saphali.com/
|
6 |
Tags: woocommerce, woo commerce russian, russian ruble, ukrainian hryvnia, mod, manadger filds checkout
|
7 |
Requires at least: 3.3 or higher
|
8 |
+
Tested up to: 3.5.1
|
9 |
+
Stable tag: 1.3.0
|
10 |
+
Version: 1.3.0
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
14 |
+
Набор русских дополнений к интернет-магазину на Woocommerce.
|
15 |
+
Adds Russian localization & special Tools in WooCommerce.
|
16 |
|
17 |
== Description ==
|
18 |
|
19 |
+
WooCommerce Russian! WooCommerce по-русски!
|
20 |
+
Русскоязычные функциональные дополнения для Woocommerce - специально для русского рынка.
|
21 |
|
22 |
+
= Интегрирует в магазин: =
|
23 |
+
* Русский интерфейс
|
24 |
+
* Валюты СНГ - Российский рубль (RUB), Украинскую гривну (UAH), Белорусский рубль (руб.) и Armenian dram (Դրամ)
|
25 |
+
* Возможность настроить заказную форму для оформления заказа
|
26 |
+
* Управление количеством колонок в каталоге
|
27 |
|
28 |
= Особенности =
|
29 |
|
30 |
+
* Улучшенная русская локализация Woocommerce (более полная поддержка русского языка).
|
31 |
+
* В общий список валют добавлены — Украинская гривна (грн.), Русский рубль (руб.), Белорусский рубль (руб.) и Armenian dram (Դրամ)
|
32 |
+
* Управление полями на странице оформления заказа и на странице профиля. Функция позволяет настроить заказную форму для оформления заказа. Можно сделать некоторые поля необязательными при оформленнии заказа или удалить их полностью, тем самым упростить оформления заказа. Также можно добавить свои специальные поля.
|
33 |
+
* Управление количеством колонок в каталоге товаров (Магазин) и категориях.
|
34 |
+
* Плагин создан с целью упростить разработку интернет-магазинов для российского рынка.
|
35 |
+
* Плагин не изменяет оригинальные файлы Woocommerce, вы можете обновлять плагин Woocommerce, каждый раз при появлении новых версий!
|
36 |
+
|
37 |
+
<strong>ВНИМАНИЕ!</strong>
|
38 |
+
|
39 |
+
Вы можете подключить к магазину все самые популярные российские и украинские платежные системы:
|
40 |
+
QIWI, Приват24, LiqPay, WebMoney, Яндекс.Деньги, Интеркасса, PayPal для России и Украины, Z-payment, ChronoPay, ROBOKASSA!
|
41 |
+
Подробнее о плагинах платежных шлюзов: http://saphali.com/wordpress/payment-gateways
|
42 |
|
43 |
+
Другие русские плагины для интернет-магазина на Woocommerce смотрите в нашем каталоге http://saphali.com/wordpress/woocommerce-plugins
|
44 |
+
|
45 |
+
<strong>Профессиональная версия - SAPHALI STANDARD</strong>
|
46 |
+
|
47 |
+
Адаптирует интернет-магазин к использованию в странах СНГ, делает магазин более функциональным и удобным в использовании и администрировании, подключает все основные российские и украинские способы оплаты - <strong>QIWI, Приват24, LiqPay (прием оплаты с карт VISA и MasterCard), WebMoney, Яндекс.Деньги, PayPal для России и Украины, Z-payment, ROBOKASSA</strong>.
|
48 |
+
Включает в себя: 8 платежных шлюзов Woocommerce и 8 новых добавленных особых функций для Woocommerce.
|
49 |
+
Подробнее на сайте http://saphali.com/woocommerce-plugins/saphali-standard
|
50 |
|
51 |
== Installation ==
|
52 |
|
56 |
|
57 |
== Screenshots ==
|
58 |
|
59 |
+
1. Улучшенная русская локализация Woocommerce. В общий список валют добавлены — Украинская гривна (грн.), Русский рубль (руб.), Белорусский рубль (руб.) и Armenian dram (Դրամ)
|
60 |
2. Управление полями на странице заказа и на странице профиля. Функция позволяет настроить заказную форму регистрации, чтобы настроить магазин на упрощенение оформления заказа. Вы можете сделать некоторые поля необязательными при регистрации/оформленнии заказа либо удалить их полностью.
|
61 |
3. Управление количеством колонок в каталоге товаров и рубриках.
|
62 |
|
63 |
== Changelog ==
|
64 |
|
65 |
+
= 1.3.0 =
|
66 |
+
* Расширение локализации под woocommerce
|
67 |
+
* Адаптация под woocommerce 2.0.0
|
68 |
+
* Переписан код, т.к. на серверах, в которых php не понимал ограничители <? и <?= выдавал ошибку "Parse error: syntax error, unexpected..."
|
69 |
+
|
70 |
= 1.2.3.2 =
|
71 |
+
* Расширение локализации под woocommerce
|
72 |
|
73 |
= 1.2.3.1 =
|
74 |
* Ошибка загрузки в repository
|
93 |
* Исправлена ошибка в управлении полями на странице заказа и на странице профиля.
|
94 |
|
95 |
= 1.0 =
|
96 |
+
* Улучшенная русская локализация Woocommerce (корректировка перевода и дополнительный перевод).
|
97 |
* В общий список валют добавлены — Украинская гривна (грн.), Русский рубль (руб.) и Белорусский рубль (руб.)
|
98 |
* Управление полями на странице заказа и на странице профиля. Функция позволяет настроить заказную форму регистрации, чтобы настроить магазин на упрощенение оформления заказа. Вы можете сделать некоторые поля необязательными при регистрации/оформленнии заказа либо удалить их полностью.
|
99 |
* Управление количеством колонок в каталоге товаров и рубриках.
|
112 |
|
113 |
== Upgrade Notice ==
|
114 |
|
115 |
+
= 1.3.0 =
|
116 |
+
* Расширение локализации под woocommerce
|
117 |
+
* Адаптация под woocommerce 2.0.0
|
118 |
+
* Переписан код, т.к. на серверах, в которых php не понимал ограничители <? и <?= выдавал ошибку "Parse error: syntax error, unexpected..."
|
119 |
+
|
120 |
= 1.2.3.2 =
|
121 |
+
* Улучшение локализации под woocommerce
|
122 |
|
123 |
= 1.2.3 =
|
124 |
* На странице управления дополнительными полями и полями доставки исправлена ошибка добавления полей.
|
saphali-woocommerce-lite.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Saphali Woocommerce Russian
|
4 |
Plugin URI: http://saphali.com/saphali-woocommerce-plugin-wordpress
|
5 |
Description: Saphali Woocommerce Russian - это бесплатный вордпресс плагин, который добавляет набор дополнений к интернет-магазину на Woocommerce.
|
6 |
-
Version: 1.
|
7 |
Author: Saphali
|
8 |
Author URI: http://saphali.com/
|
9 |
*/
|
@@ -31,216 +31,715 @@ Author URI: http://saphali.com/
|
|
31 |
// Подключение валюты и локализации
|
32 |
define('SAPHALI_PLUGIN_DIR_URL',plugin_dir_url(__FILE__));
|
33 |
define('SAPHALI_PLUGIN_DIR_PATH',plugin_dir_path(__FILE__));
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
function add_inr_currency( $currencies ) {
|
36 |
$currencies['UAH'] = __( 'Ukrainian hryvnia ( grn.)', 'themewoocommerce' );
|
37 |
$currencies['RUR'] = __( 'Russian ruble ( rub.)', 'themewoocommerce' );
|
38 |
$currencies['BYR'] = __( 'Belarusian ruble ( Br.)', 'themewoocommerce' );
|
|
|
39 |
return $currencies;
|
40 |
}
|
41 |
-
|
42 |
-
if ( ! function_exists( 'add_inr_currency_symbol' ) ) {
|
43 |
-
function add_inr_currency_symbol( $symbol ) {
|
44 |
$currency = get_option( 'woocommerce_currency' );
|
45 |
switch( $currency ) {
|
46 |
-
case 'UAH': $
|
47 |
-
case 'RUB': $
|
48 |
-
case 'RUR': $
|
49 |
-
case 'BYR': $
|
|
|
50 |
}
|
51 |
-
return $
|
52 |
}
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
-
|
58 |
-
if
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
<tr>
|
109 |
-
<th
|
110 |
-
<
|
111 |
-
|
112 |
-
|
113 |
-
</
|
|
|
|
|
|
|
|
|
|
|
114 |
</tr>
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
<?php
|
120 |
-
endforeach; echo '</fieldset>';
|
121 |
}
|
122 |
-
}
|
123 |
-
|
124 |
function woocommerce_get_customer_meta_fields_saph_ed() {
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
|
|
214 |
)
|
215 |
-
)
|
216 |
-
|
217 |
-
return $show_fields;
|
218 |
-
}
|
219 |
-
function woocommerce_save_customer_meta_fields_saphali( $user_id ) {
|
220 |
-
if ( ! current_user_can( 'manage_woocommerce' ) )
|
221 |
-
return $columns;
|
222 |
-
|
223 |
-
$show_fields = woocommerce_get_customer_meta_fields_saphali();
|
224 |
-
if(!empty($show_fields["billing"])) {
|
225 |
-
$save_fields["billing"]['title'] = __('Customer Billing Address', 'woocommerce');
|
226 |
-
$save_fields["billing"]['fields'] = $show_fields["billing"];
|
227 |
-
}
|
228 |
-
if(!empty($show_fields["shipping"])) {
|
229 |
-
$save_fields["shipping"]['title'] = __('Customer Shipping Address', 'woocommerce');
|
230 |
-
$save_fields["shipping"]['fields'] = $show_fields["shipping"];
|
231 |
-
}
|
232 |
-
/* if(!empty($show_fields["order"])) {
|
233 |
-
$save_fields["order"]['title'] = __('Дополнительные поля', 'woocommerce');
|
234 |
-
$save_fields["order"]['fields'] = $show_fields["order"];
|
235 |
-
} */
|
236 |
-
foreach( $save_fields as $fieldset )
|
237 |
-
foreach( $fieldset['fields'] as $key => $field )
|
238 |
-
if ( isset( $_POST[ $key ] ) )
|
239 |
-
update_user_meta( $user_id, $key, trim( esc_attr( $_POST[ $key ] ) ) );
|
240 |
}
|
241 |
function woocommerce_get_customer_meta_fields_saphali() {
|
242 |
$fieldss = get_option('woocommerce_saphali_filds_filters');
|
243 |
-
$show_fields = woocommerce_get_customer_meta_fields_saph_ed();
|
244 |
if(is_array($fieldss)) {
|
245 |
if(is_array($fieldss["billing"])) {
|
246 |
$billing['fields'] = array();
|
@@ -295,9 +794,31 @@ function woocommerce_lang_s_l() {
|
|
295 |
|
296 |
return $show_fields;
|
297 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
function woocommerce_admin_order_data_after_billing_address_s($order) {
|
299 |
-
|
300 |
-
|
301 |
if(is_array($billing_data["billing"])) {
|
302 |
foreach ( $billing_data["billing"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
303 |
|
@@ -310,8 +831,8 @@ function woocommerce_lang_s_l() {
|
|
310 |
echo '</div>';
|
311 |
}
|
312 |
function woocommerce_admin_order_data_after_shipping_address_s($order) {
|
313 |
-
|
314 |
-
|
315 |
if(is_array($billing_data["shipping"])) {
|
316 |
foreach ( $billing_data["shipping"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
317 |
|
@@ -324,8 +845,8 @@ function woocommerce_lang_s_l() {
|
|
324 |
echo '</div>';
|
325 |
}
|
326 |
function woocommerce_admin_order_data_after_order_details_s($order) {
|
327 |
-
|
328 |
-
|
329 |
if(is_array($billing_data["order"])) {
|
330 |
foreach ( $billing_data["order"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
331 |
|
@@ -339,8 +860,6 @@ function woocommerce_lang_s_l() {
|
|
339 |
}
|
340 |
echo '</div>';
|
341 |
}
|
342 |
-
/*Конец*/
|
343 |
-
// Our hooked in function - $fields is passed via the filter!
|
344 |
function saphali_custom_override_checkout_fields( $fields ) {
|
345 |
|
346 |
$fieldss = get_option('woocommerce_saphali_filds_filters');
|
@@ -359,540 +878,20 @@ function woocommerce_lang_s_l() {
|
|
359 |
return $fields;
|
360 |
}
|
361 |
function saphali_custom_shipping_fields( $fields ) {
|
362 |
-
|
363 |
$fieldss = get_option('woocommerce_saphali_filds_filters');
|
364 |
if(is_array($fieldss))
|
365 |
$fields = $fieldss["shipping"];
|
366 |
return $fields;
|
367 |
}
|
368 |
-
|
369 |
-
add_filter( 'woocommerce_currency_symbol', 'add_inr_currency_symbol' );
|
370 |
-
add_action( 'admin_enqueue_scripts', 'admin_enqueue_scripts_page_saphali' );
|
371 |
-
|
372 |
-
function admin_enqueue_scripts_page_saphali() {
|
373 |
-
if($_GET['page'] == 'woocommerce_saphali_s_l' && $_GET['tab'] ==1 )
|
374 |
-
wp_enqueue_script( 'tablednd', plugins_url('/js/jquery.tablednd.0.5.js', __FILE__) );
|
375 |
-
}
|
376 |
-
|
377 |
-
|
378 |
-
function woocommerce_saphali_page_s_l () {
|
379 |
-
|
380 |
-
|
381 |
-
?>
|
382 |
-
<div class="wrap woocommerce"><div class="icon32 icon32-woocommerce-reports" id="icon-woocommerce"><br /></div>
|
383 |
-
<h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
|
384 |
-
Настройки Saphali WC
|
385 |
-
</h2>
|
386 |
-
<ul class="subsubsub">
|
387 |
-
|
388 |
-
<li><a href="admin.php?page=woocommerce_saphali_s_l" <? if($_GET["tab"] == '') echo 'class="current"';?>><span color="red">Дополнительная информация</span></a> | </li>
|
389 |
-
<li><a href="admin.php?page=woocommerce_saphali_s_l&tab=1" <? if($_GET["tab"] == 1) echo 'class="current"';?>>Управление полями</a> | </li>
|
390 |
-
<li><a href="admin.php?page=woocommerce_saphali_s_l&tab=2" <? if($_GET["tab"] == 2) echo 'class="current"';?>>Число колонок в каталоге</a></li>
|
391 |
-
|
392 |
-
</ul>
|
393 |
-
<? if($_GET["tab"] == '') {?>
|
394 |
-
<div class="clear"></div>
|
395 |
-
<h2 class="woo-nav-tab-wrapper">Дополнительная информация</h2>
|
396 |
-
<? include_once (SAPHALI_PLUGIN_DIR_PATH . 'go_pro.php'); ?>
|
397 |
-
|
398 |
-
<?php } elseif($_GET["tab"] == 2) {?>
|
399 |
-
<div class="clear"></div>
|
400 |
-
<h2 class="woo-nav-tab-wrapper">Число колонок в каталоге товаров и в рубриках</h2>
|
401 |
-
<? include_once (SAPHALI_PLUGIN_DIR_PATH . 'count-column.php'); ?>
|
402 |
-
|
403 |
-
<?php } elseif($_GET["tab"] == 1) {
|
404 |
-
global $woocommerce;
|
405 |
-
$f = $woocommerce->checkout();
|
406 |
-
if($_POST){
|
407 |
-
if($_POST["reset"] != 'All') {
|
408 |
-
// Управление новыми полями
|
409 |
-
|
410 |
-
if(is_array($_POST["billing"]["new_fild"])) {
|
411 |
-
foreach($_POST["billing"]["new_fild"] as $k_nf => $v_nf) {
|
412 |
-
if($k_nf == 'name')
|
413 |
-
foreach($v_nf as $v_nf_f)
|
414 |
-
$new_fild[] = $v_nf_f;
|
415 |
-
else {
|
416 |
-
foreach($v_nf as $k_nf_f => $v_nf_f) {
|
417 |
-
if($k_nf == 'class') {
|
418 |
-
$v_nf_f = array ( $v_nf_f );
|
419 |
-
$addFild["billing"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
420 |
-
} else $addFild["billing"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
421 |
-
//$addFild["billing"][$new_fild[$k_nf_f]]['add_new'] = true;
|
422 |
-
}
|
423 |
-
}
|
424 |
-
}
|
425 |
-
unset($_POST["billing"]["new_fild"]);
|
426 |
-
unset($new_fild);
|
427 |
-
}
|
428 |
-
if(is_array($_POST["shipping"]["new_fild"])) {
|
429 |
-
foreach($_POST["shipping"]["new_fild"] as $k_nf => $v_nf) {
|
430 |
-
if($k_nf == 'name')
|
431 |
-
foreach($v_nf as $v_nf_f)
|
432 |
-
$new_fild[] = $v_nf_f;
|
433 |
-
else {
|
434 |
-
foreach($v_nf as $k_nf_f => $v_nf_f) {
|
435 |
-
if($k_nf == 'class') {
|
436 |
-
$v_nf_f = array ( $v_nf_f );
|
437 |
-
$addFild["shipping"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
438 |
-
} else $addFild["shipping"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
439 |
-
//$addFild["shipping"][$new_fild[$k_nf_f]]['add_new'] = true;
|
440 |
-
}
|
441 |
-
}
|
442 |
-
}
|
443 |
-
unset($_POST["shipping"]["new_fild"]);
|
444 |
-
unset($new_fild);
|
445 |
-
}
|
446 |
-
if(is_array($_POST["order"]["new_fild"])) {
|
447 |
-
foreach($_POST["order"]["new_fild"] as $k_nf => $v_nf) {
|
448 |
-
if($k_nf == 'name')
|
449 |
-
foreach($v_nf as $v_nf_f)
|
450 |
-
$new_fild[] = $v_nf_f;
|
451 |
-
else {
|
452 |
-
foreach($v_nf as $k_nf_f => $v_nf_f) {
|
453 |
-
if($k_nf == 'class') {
|
454 |
-
$v_nf_f = array ( $v_nf_f );
|
455 |
-
$addFild["order"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
456 |
-
} else $addFild["order"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
457 |
-
//$addFild["order"][$new_fild[$k_nf_f]]['add_new'] = true;
|
458 |
-
}
|
459 |
-
}
|
460 |
-
}
|
461 |
-
unset($_POST["order"]["new_fild"]);
|
462 |
-
}
|
463 |
-
//END
|
464 |
-
$filds = $f->checkout_fields;
|
465 |
-
foreach($filds["billing"] as $key_post => $value_post) {
|
466 |
-
$filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post] = $value_post;
|
467 |
-
if($_POST["billing"][$key_post]['public'] != 'on') {
|
468 |
-
$filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post]["public"] = false;
|
469 |
-
$fild_remove_filter["billing"][] = $key_post;
|
470 |
-
} else {$filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post]["public"] = true;}
|
471 |
-
|
472 |
-
$_POST["billing"][$key_post]['required'] = ($_POST["billing"][$key_post]['required'] == 'on') ? true : false ;
|
473 |
-
|
474 |
-
$_POST["billing"][$key_post]['clear'] = $bool_clear = ($_POST["billing"][$key_post]['clear'] == 'on') ? true : false ;
|
475 |
-
|
476 |
-
foreach($value_post as $k_post=> $v_post){
|
477 |
-
if( $_POST["billing"][$key_post][$k_post] != $v_post && isset($_POST["billing"][$key_post][$k_post]) ) {
|
478 |
-
$filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post][$k_post] = $_POST["billing"][$key_post][$k_post];
|
479 |
-
}
|
480 |
-
}
|
481 |
-
if( $bool_clear ){
|
482 |
-
$filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post]['clear'] = $bool_clear;
|
483 |
-
} elseif(isset($filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post]['clear'])) {
|
484 |
-
unset($filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post]['clear']);
|
485 |
-
}
|
486 |
-
unset($_POST["billing"][$key_post]);
|
487 |
-
}
|
488 |
-
foreach($filds["shipping"] as $key_post => $value_post) {
|
489 |
-
$filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post] = $value_post;
|
490 |
-
|
491 |
-
if($_POST["shipping"][$key_post]['public'] != 'on') {
|
492 |
-
$filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post]["public"] = false;
|
493 |
-
$fild_remove_filter["shipping"][] = $key_post;
|
494 |
-
} else {$filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post]["public"] = true;}
|
495 |
-
|
496 |
-
$_POST["shipping"][$key_post]['clear'] = $bool_clear = ($_POST["shipping"][$key_post]['clear'] == 'on') ? true : false ;
|
497 |
-
|
498 |
-
$_POST["shipping"][$key_post]['required'] = ($_POST["shipping"][$key_post]['required'] == 'on') ? true : false ;
|
499 |
-
|
500 |
-
foreach($value_post as $k_post=> $v_post){
|
501 |
-
if( $_POST["shipping"][$key_post][$k_post] != $v_post && isset($_POST["shipping"][$key_post][$k_post]) ) {
|
502 |
-
$filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post][$k_post] = $_POST["shipping"][$key_post][$k_post];
|
503 |
-
}
|
504 |
-
}
|
505 |
-
if( $bool_clear ){
|
506 |
-
$filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post]['clear'] = $bool_clear;
|
507 |
-
} elseif(isset($filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post]['clear'])) {
|
508 |
-
unset($filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post]['clear']);
|
509 |
-
}
|
510 |
-
unset($_POST["shipping"][$key_post]);
|
511 |
-
}
|
512 |
-
|
513 |
-
foreach($filds["order"] as $key_post => $value_post) {
|
514 |
-
$filds_new["order"][$_POST["order"][$key_post]["order"]][$key_post] = $value_post;
|
515 |
-
if($_POST["order"][$key_post]['public'] != 'on') {
|
516 |
-
$filds_new["order"][$_POST["order"][$key_post]["order"]][$key_post]["public"] = false;
|
517 |
-
$fild_remove_filter["order"][] = $key_post;
|
518 |
-
} else {$filds_new["order"][$_POST["order"][$key_post]["order"]][$key_post]["public"] = true;}
|
519 |
-
|
520 |
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
if( $_POST["order"][$key_post][$k_post] != $v_post && isset($_POST["order"][$key_post][$k_post]) ) {
|
526 |
-
$filds_new["order"][$_POST["order"][$key_post]["order"]][$key_post][$k_post] = $_POST["order"][$key_post][$k_post];
|
527 |
-
}
|
528 |
-
}
|
529 |
-
unset($_POST["order"][$key_post]);
|
530 |
-
}
|
531 |
-
// Управление публикацией
|
532 |
-
if(!empty($_POST["billing"])) {
|
533 |
-
foreach($_POST["billing"] as $k_post => $v_post) {
|
534 |
-
if($v_post["public"] != 'on' )
|
535 |
-
$fild_remove_filter["billing"][] = $k_post;
|
536 |
-
}
|
537 |
-
}
|
538 |
-
if(!empty($_POST["shipping"])) {
|
539 |
-
foreach($_POST["shipping"] as $k_post => $v_post) {
|
540 |
-
if($v_post["public"] != 'on' )
|
541 |
-
$fild_remove_filter["shipping"][] = $k_post;
|
542 |
-
}
|
543 |
-
}
|
544 |
-
if(!empty($_POST["order"])) {
|
545 |
-
foreach($_POST["order"] as $k_post => $v_post) {
|
546 |
-
if($v_post["public"] != 'on' )
|
547 |
-
$fild_remove_filter["order"][] = $k_post;
|
548 |
-
}
|
549 |
-
}
|
550 |
-
//END Управление публикацией
|
551 |
-
$filds_finish["billing"] = $filds_finish["shipping"] = $filds_finish["order"] = array();
|
552 |
-
|
553 |
-
for($i = 0; $i<count($filds_new["billing"]); $i++) {
|
554 |
-
if(isset($filds_new["billing"][$i]))
|
555 |
-
$filds_finish["billing"] = $filds_finish["billing"] + $filds_new["billing"][$i];
|
556 |
-
}
|
557 |
-
for($i = 0; $i<count($filds_new["shipping"]); $i++) {
|
558 |
-
if(isset($filds_new["shipping"][$i]))
|
559 |
-
$filds_finish["shipping"] = $filds_finish["shipping"] + $filds_new["shipping"][$i];
|
560 |
-
}
|
561 |
-
for($i = 0; $i<count($filds_new["order"]); $i++) {
|
562 |
-
if(isset($filds_new["order"][$i]))
|
563 |
-
$filds_finish["order"] = $filds_finish["order"] + $filds_new["order"][$i];
|
564 |
-
}
|
565 |
-
|
566 |
-
if(is_array($_POST["billing"]))
|
567 |
-
$filds_finish["billing"] = $filds_finish["billing"] + $_POST["billing"];
|
568 |
-
if(is_array($_POST["shipping"]))
|
569 |
-
$filds_finish["shipping"] = $filds_finish["shipping"] + $_POST["shipping"];
|
570 |
-
if(is_array($_POST["order"]))
|
571 |
-
$filds_finish["order"] = $filds_finish["order"] + $_POST["order"];
|
572 |
-
|
573 |
-
if(is_array($addFild["billing"]))
|
574 |
-
$filds_finish["billing"] = $filds_finish["billing"] + $addFild["billing"];
|
575 |
-
if(is_array($addFild["shipping"]))
|
576 |
-
$filds_finish["shipping"] = $filds_finish["shipping"] + $addFild["shipping"]+ $_POST["shipping"];
|
577 |
-
if(is_array($addFild["order"]))
|
578 |
-
$filds_finish["order"] = $filds_finish["order"] + $addFild["order"] + $_POST["order"];
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
$filds_finish_filter = $filds_finish;
|
583 |
-
if(is_array($fild_remove_filter["billing"])) {
|
584 |
-
foreach($fild_remove_filter["billing"] as $v_filt){
|
585 |
-
unset($filds_finish_filter["billing"][$v_filt]);
|
586 |
-
}
|
587 |
-
}
|
588 |
-
if(is_array($fild_remove_filter["shipping"])) {
|
589 |
-
foreach($fild_remove_filter["shipping"] as $v_filt){
|
590 |
-
unset($filds_finish_filter["shipping"][$v_filt]);
|
591 |
-
}
|
592 |
-
}
|
593 |
-
if(is_array($fild_remove_filter["order"])) {
|
594 |
-
foreach($fild_remove_filter["order"] as $v_filt){
|
595 |
-
unset($filds_finish_filter["order"][$v_filt]);
|
596 |
-
}
|
597 |
-
}
|
598 |
-
if(!update_option('woocommerce_saphali_filds',$filds_finish))add_option('woocommerce_saphali_filds',$filds_finish);
|
599 |
-
if(!update_option('woocommerce_saphali_filds_filters',$filds_finish_filter))add_option('woocommerce_saphali_filds_filters',$filds_finish_filter);
|
600 |
-
} else {
|
601 |
-
delete_option('woocommerce_saphali_filds');
|
602 |
-
delete_option('woocommerce_saphali_filds_filters');
|
603 |
-
}
|
604 |
-
}
|
605 |
-
|
606 |
-
?>
|
607 |
-
<div class="clear"></div>
|
608 |
-
<h3 class="nav-tab-wrapper woo-nav-tab-wrapper" style="text-align: center;">Управление полями на странице заказа и на странице профиля</h3>
|
609 |
-
|
610 |
-
<h2 align="center">Реквизиты оплаты</h2>
|
611 |
-
<form action="" method="post">
|
612 |
-
<table class="wp-list-table widefat fixed posts" cellspacing="0">
|
613 |
-
<thead>
|
614 |
-
<tr>
|
615 |
-
<th width="130px">Название<img class="help_tip" data-tip="Название поля должно быть уни­ка­ль­ным (не должно повторяться)." src="<? bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /></th>
|
616 |
-
<th width="130px">Заголовок</th>
|
617 |
-
<th width="130px">Текст в поле</th>
|
618 |
-
<th width="35px">Clear<img class="help_tip" data-tip="Указывает на то, что следующее поле за текущим, будет начинаться с новой строки." src="<? bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /> </th>
|
619 |
-
<th width="130px">Класс поля<img class="help_tip" data-tip="<h3 style='margin:0;padding:0'>Задает стиль текущего поля</h3><ul style='text-align: left;'><li><span style='color: #000'>form-row-first</span> – первый в строке;</li><li><span style='color: #000'>form-row-last</span> – последний в строке.</li></ul><hr /><span style='color: #000'>ЕСЛИ ОСТАВИТЬ ПУСТЫМ</span>, то поле будет отображаться на всю ширину. Соответственно, в предыдущем поле (которое выше) нужно отметить «Clear»." src="<? bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /></th>
|
620 |
-
<th width="40px">Обя­за­те­ль­ное</th>
|
621 |
-
|
622 |
-
<th width="40px">Опу­бли­ко­вать</th>
|
623 |
-
|
624 |
-
<th width="65px">Удалить/До­ба­вить</th>
|
625 |
-
</tr>
|
626 |
-
</thead>
|
627 |
-
<tfoot>
|
628 |
-
<tr>
|
629 |
-
<th>Название</th>
|
630 |
-
<th>Заголовок</th>
|
631 |
-
<th>Текст в поле</th>
|
632 |
-
<th width="35px">Clear<img class="help_tip" data-tip="Указывает на то, что следующее поле за текущим, будет начинаться с новой строки." src="<? bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /> </th>
|
633 |
-
<th>Класс поля</th>
|
634 |
-
<th width="40px">Обя­за­те­ль­ное</th>
|
635 |
-
|
636 |
-
<th width="40px">Опу­бли­ко­вать</th>
|
637 |
-
|
638 |
-
<th>Удалить/До­ба­вить</th>
|
639 |
-
</tr>
|
640 |
-
</tfoot>
|
641 |
-
<tbody id="the-list" class="myTable">
|
642 |
-
<?
|
643 |
-
|
644 |
-
$count = 0;
|
645 |
-
|
646 |
-
$checkout_fields = get_option('woocommerce_saphali_filds');
|
647 |
-
|
648 |
-
if(is_array($checkout_fields["billing"])) $f->checkout_fields["billing"] = $checkout_fields["billing"];
|
649 |
-
foreach($f->checkout_fields["billing"] as $key => $value) {
|
650 |
-
if(empty($value['public']) && !is_array($checkout_fields["billing"])) $value['public'] = true;
|
651 |
-
?>
|
652 |
-
<tr>
|
653 |
-
<td> <input disabled value='<?=$key?>' type="text" name="billing[<?=$key?>][name]" /></td>
|
654 |
-
<td><input value='<?=$value['label']?>' type="text" name="billing[<?=$key?>][label]" /></td>
|
655 |
-
<td><input value='<?=$value['placeholder']?>' type="text" name="billing[<?=$key?>][placeholder]" /></td>
|
656 |
-
<td><input <? if($value['clear']) echo 'checked'?> class="<?=$value['clear']?>" type="checkbox" name="billing[<?=$key?>][clear]" /></td>
|
657 |
-
<td><? if(is_array($value['class'])) { foreach($value['class'] as $v_class) { ?>
|
658 |
-
<input value='<?=$v_class;?>' type="text" name="billing[<?=$key?>][class][]" /> <? } } else { ?>
|
659 |
-
<input value='' type="text" name="billing[<?=$key?>][class][]" /> <?
|
660 |
-
} ?></td>
|
661 |
-
<td><input <? if($value['required']) echo 'checked'?> type="checkbox" name="billing[<?=$key?>][required]" /></td>
|
662 |
-
<td><input <? if($value['public']) echo 'checked';?> type="checkbox" name="billing[<?=$key?>][public]" /></td>
|
663 |
-
|
664 |
-
<td><input rel="sort_order" id="order_count" type="hidden" name="billing[<?=$key?>][order]" value="<?=$count?>" />
|
665 |
-
<input type="button" class="button" id="billing_delete" value="Удалить -"/></td>
|
666 |
-
</tr>
|
667 |
-
<? $count++;
|
668 |
-
}
|
669 |
-
?>
|
670 |
-
<tr class="nodrop nodrag">
|
671 |
-
<td></td>
|
672 |
-
<td></td>
|
673 |
-
<td></td>
|
674 |
-
<td></td>
|
675 |
-
<td></td>
|
676 |
-
<td></td>
|
677 |
-
|
678 |
-
<td></td>
|
679 |
-
|
680 |
-
<td><input type="button" class="button" id="billing" value="Добавить +"/></td>
|
681 |
-
</tr>
|
682 |
-
</tbody>
|
683 |
-
</table>
|
684 |
-
|
685 |
-
<h2 align="center">Реквизиты доставки</h2>
|
686 |
-
<table class="wp-list-table widefat fixed posts" cellspacing="0">
|
687 |
-
<thead>
|
688 |
-
<tr>
|
689 |
-
<th width="130px">Название<img class="help_tip" data-tip="Название поля должно быть уни­ка­ль­ным (не должно повторяться)." src="<? bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /></th>
|
690 |
-
<th width="130px">Заголовок</th>
|
691 |
-
<th width="130px">Текст в поле</th>
|
692 |
-
<th width="35px">Clear<img class="help_tip" data-tip="Указывает на то, что следующее поле за текущим, будет начинаться с новой строки." src="<? bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /> </th>
|
693 |
-
<th width="130px">Класс поля<img class="help_tip" data-tip="<h3 style='margin:0;padding:0'>Задает стиль текущего поля</h3><ul style='text-align: left;'><li><span style='color: #000'>form-row-first</span> – первый в строке;</li><li><span style='color: #000'>form-row-last</span> – последний в строке.</li></ul><hr /><span style='color: #000'>ЕСЛИ ОСТАВИТЬ ПУСТЫМ</span>, то поле будет отображаться на всю ширину. Соответственно, в предыдущем поле (которое выше) нужно отметить «Clear»." src="<? bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /></th>
|
694 |
-
<th width="40px">Обя­за­те­ль­ное</th>
|
695 |
-
|
696 |
-
<th width="40px">Опу­бли­ко­вать</th>
|
697 |
-
|
698 |
-
<th width="65px">Удалить/До­ба­вить</th>
|
699 |
-
</tr>
|
700 |
-
</thead>
|
701 |
-
<tfoot>
|
702 |
-
<tr>
|
703 |
-
<th>Название</th>
|
704 |
-
<th>Заголовок</th>
|
705 |
-
<th>Текст в поле</th>
|
706 |
-
<th width="56px">Clear<img class="help_tip" data-tip="Указывает на то, что следующее поле за текущим, будет начинаться с новой строки." src="<? bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /> </th>
|
707 |
-
<th>Класс поля</th>
|
708 |
-
<th width="40px">Обя­за­те­ль­ное</th>
|
709 |
-
|
710 |
-
<th width="40px">Опу­бли­ко­вать</th>
|
711 |
-
|
712 |
-
<th>Удалить/До­ба­вить</th>
|
713 |
-
</tr>
|
714 |
-
</tfoot>
|
715 |
-
<tbody id="the-list" class="myTable">
|
716 |
-
<? $count = 0;
|
717 |
-
if(is_array($checkout_fields["shipping"])) $f->checkout_fields["shipping"] = $checkout_fields["shipping"];
|
718 |
-
foreach($f->checkout_fields["shipping"] as $key => $value) {
|
719 |
-
if( empty($value['public']) && !is_array($checkout_fields["shipping"]) ) $value['public'] = true;
|
720 |
-
?>
|
721 |
-
<tr>
|
722 |
-
<td><input disabled value=<?=$key?> type="text" name="shipping[<?=$key?>][name]" /></td>
|
723 |
-
<td><input value='<?=$value['label']?>' type="text" name="shipping[<?=$key?>][label]" /></td>
|
724 |
-
<td><input value='<?=$value['placeholder']?>' type="text" name="shipping[<?=$key?>][placeholder]" /></td>
|
725 |
-
<td><input <? if($value['clear']) echo 'checked'?> class="<?=$value['clear']?>" type="checkbox" name="shipping[<?=$key?>][clear]" /></td>
|
726 |
-
<td><? if(is_array($value['class'])) { foreach($value['class'] as $v_class) { ?>
|
727 |
-
|
728 |
-
<input value='<?=$v_class;?>' type="text" name="shipping[<?=$key?>][class][]" /> <? } } else { ?>
|
729 |
-
<input value='' type="text" name="shipping[<?=$key?>][class][]" /> <?
|
730 |
-
} ?></td>
|
731 |
-
<td><input <? if($value['required']) echo 'checked'?> type="checkbox" name="shipping[<?=$key?>][required]" /></td>
|
732 |
-
<td><input <? if($value['public']) echo 'checked';?> type="checkbox" name="shipping[<?=$key?>][public]" /></td>
|
733 |
-
|
734 |
-
<td><input rel="sort_order" id="order_count" type="hidden" name="shipping[<?=$key?>][order]" value="<?=$count?>" /><input type="button" class="button" id="billing_delete" value="Удалить -"/></td>
|
735 |
-
</tr>
|
736 |
-
<? $count++;
|
737 |
-
}
|
738 |
-
?>
|
739 |
-
<tr class="nodrop nodrag">
|
740 |
-
<td></td>
|
741 |
-
<td></td>
|
742 |
-
<td></td>
|
743 |
-
|
744 |
-
<td></td>
|
745 |
-
<td></td>
|
746 |
-
<td></td>
|
747 |
-
<td></td>
|
748 |
-
|
749 |
-
<td><input type="button" class="button" id="shipping" value="Добавить +"/></td>
|
750 |
-
</tr>
|
751 |
-
|
752 |
-
</tbody>
|
753 |
-
</table>
|
754 |
-
<br />
|
755 |
-
<h2 align="center">Дополнительные поля</h2>
|
756 |
-
<table class="wp-list-table widefat fixed posts" cellspacing="0">
|
757 |
-
<thead>
|
758 |
-
<tr>
|
759 |
-
<th width="130px">Название<img class="help_tip" data-tip="Название поля должно быть уни­ка­ль­ным (не должно повторяться)." src="<? bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /></th>
|
760 |
-
<th width="130px">Заголовок</th>
|
761 |
-
<th width="130px">Текст в поле</th>
|
762 |
-
<th width="130px">Класс поля</th>
|
763 |
-
<th width="130px">Тип поля</th>
|
764 |
-
<th width="40px">Опу­бли­ко­вать</th>
|
765 |
-
|
766 |
-
<th width="65px">Удалить/До­ба­вить</th>
|
767 |
-
</tr>
|
768 |
-
</thead>
|
769 |
-
<tfoot>
|
770 |
-
<tr>
|
771 |
-
<th>Название</th>
|
772 |
-
<th>Заголовок</th>
|
773 |
-
<th>Текст в поле</th>
|
774 |
-
<th>Класс поля</th>
|
775 |
-
<th>Тип поля</th>
|
776 |
-
<th width="40px">Опу­бли­ко­вать</th>
|
777 |
-
|
778 |
-
<th>Удалить/До­ба­вить</th>
|
779 |
-
</tr>
|
780 |
-
</tfoot>
|
781 |
-
<tbody id="the-list" class="myTable">
|
782 |
-
<? $count = 0;
|
783 |
-
if(is_array($checkout_fields["order"])) $f->checkout_fields["order"] = $checkout_fields["order"];
|
784 |
-
foreach($f->checkout_fields["order"] as $key => $value) {
|
785 |
-
if(empty($value['public']) && !is_array($checkout_fields["order"])) $value['public'] = true;
|
786 |
-
?>
|
787 |
-
<tr>
|
788 |
-
<td><input disabled value=<?=$key?> type="text" name="order[<?=$key?>][name]" /></td>
|
789 |
-
<td><input value='<?=$value['label']?>' type="text" name="order[<?=$key?>][label]" /></td>
|
790 |
-
<td><input value='<?=$value['placeholder']?>' type="text" name="order[<?=$key?>][placeholder]" /></td>
|
791 |
-
|
792 |
-
<td><? if(is_array($value['class'])) { foreach($value['class'] as $v_class) { ?>
|
793 |
-
|
794 |
-
<input value='<?=$v_class;?>' type="text" name="order[<?=$key?>][class][]" /> <? } } else { ?>
|
795 |
-
<input value='' type="text" name="order[<?=$key?>][class][]" /> <?
|
796 |
-
} ?></td>
|
797 |
-
<td><input value='<?=$value['type']?>' type="text" name="order[<?=$key?>][type]" /></td>
|
798 |
-
<td><input <? if($value['public']) echo 'checked';?> type="checkbox" name="order[<?=$key?>][public]" /></td>
|
799 |
-
|
800 |
-
<td><input id="order_count" rel="sort_order" type="hidden" name="order[<?=$key?>][order]" value="<?=$count?>" /><input type="button" class="button" id="billing_delete" value="Удалить -"/></td>
|
801 |
-
</tr>
|
802 |
-
<? $count++;
|
803 |
-
}
|
804 |
-
?>
|
805 |
-
<tr class="nodrop nodrag">
|
806 |
-
<td></td>
|
807 |
-
<td></td>
|
808 |
-
<td></td>
|
809 |
-
<td></td>
|
810 |
-
<td></td>
|
811 |
-
<td></td>
|
812 |
-
|
813 |
-
|
814 |
-
<td><input type="button" class="button" id="order" value="Добавить +"/></td>
|
815 |
-
</tr>
|
816 |
-
</tbody>
|
817 |
-
</table><br />
|
818 |
-
<input type="submit" class="button alignleft" value="Сохранить"/>
|
819 |
-
</form>
|
820 |
-
<form action="" method="post">
|
821 |
-
<input type="hidden" name="reset" value="All"/>
|
822 |
-
<input type="submit" class="button alignright" value="Восстановить поля по умолчанию"/>
|
823 |
-
</form>
|
824 |
-
<style type="text/css">
|
825 |
-
#tiptip_content{font-size:11px;color:#fff;padding:4px 8px;background:#a2678c;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;box-shadow:1px 1px 3px rgba(0,0,0,0.1);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,0.1);text-align:center}#tiptip_content code{background:#855c76;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#a2678c}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#a2678c}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#a2678c}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#a2678c}img.help_tip{vertical-align:middle;margin:0 0 0 3px}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_left{padding-right:5px}#tiptip_content{font-size:11px;color:#fff;padding:4px 8px;background:#a2678c;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;box-shadow:1px 1px 3px rgba(0,0,0,0.1);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,0.1);text-align:center}#tiptip_content code{background:#855c76;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#a2678c}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#a2678c}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#a2678c}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#a2678c}
|
826 |
-
input[disabled="disabled"], input[disabled=""] {
|
827 |
-
background:none repeat scroll 0 0 #EAEAEA !important;
|
828 |
-
color:#636060 !important;
|
829 |
-
}
|
830 |
-
</style>
|
831 |
-
<script type="text/javascript">
|
832 |
-
(function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery);
|
833 |
-
jQuery(".tips, .help_tip").tipTip({
|
834 |
-
'attribute' : 'data-tip',
|
835 |
-
'fadeIn' : 50,
|
836 |
-
'fadeOut' : 50,
|
837 |
-
'delay' : 200
|
838 |
-
});
|
839 |
-
jQuery('.button#billing').live('click',function() {
|
840 |
-
var obj = jQuery(this).parent().parent();
|
841 |
-
obj.html('<td><input value="billing_new_fild'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" type="text" name="billing[new_fild][name][]" /></td><td><input value="" type="text" name="billing[new_fild][label][]" /></td><td><input value="" type="text" name="billing[new_fild][placeholder][]" /></td><td><input type="checkbox" name="billing[new_fild][clear][]" /></td><td><input value="" type="text" name="billing[new_fild][class][]" /></td><td><input checked type="checkbox" name="billing[new_fild][required][]" /></td><td><input checked type="checkbox" name="billing[new_fild][public][]" /></td><td><input id="order_count" rel="sort_order" type="hidden" name="billing[new_fild][order][]" value="'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" /><input type="button" class="button" id="billing_delete" value="Удалить -"/></td>');
|
842 |
-
obj.removeClass('nodrop nodrag');
|
843 |
-
obj.after('<tr class="nodrop nodrag"><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><input type="button" class="button" id="billing" value="Добавить +"/></td></tr>');
|
844 |
-
});
|
845 |
-
jQuery('.button#shipping').live('click',function() {
|
846 |
-
var obj = jQuery(this).parent().parent();
|
847 |
-
obj.html('<td><input value="shipping_new_fild'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" type="text" name="shipping[new_fild][name][]" /></td><td><input value="" type="text" name="shipping[new_fild][label][]" /></td><td><input value="" type="text" name="shipping[new_fild][placeholder][]" /></td><td><input type="checkbox" name="shipping[new_fild][clear][]" /></td><td><input value="" type="text" name="shipping[new_fild][class][]" /></td><td><input checked type="checkbox" name="shipping[new_fild][required][]" /></td><td><input checked type="checkbox" name="shipping[new_fild][public][]" /></td><td><input id="order_count" rel="sort_order" type="hidden" name="shipping[new_fild][order][]" value="'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" /><input type="button" class="button" id="billing_delete" value="Удалить -"/></td>');
|
848 |
-
obj.removeClass('nodrop nodrag');
|
849 |
-
obj.after('<tr class="nodrop nodrag"><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><input type="button" class="button" id="shipping" value="Добавить +"/></td></tr>');
|
850 |
-
});
|
851 |
-
jQuery('.button#order').live('click',function() {
|
852 |
-
var obj = jQuery(this).parent().parent();
|
853 |
-
obj.html('<td><input value="order_new_fild'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" type="text" name="order[new_fild][name][]" /></td><td><input value="" type="text" name="order[new_fild][label][]" /></td><td><input value="" type="text" name="order[new_fild][placeholder][]" /></td><td><input value="" type="text" name="order[new_fild][class][]" /></td><td><input checked type="text" name="order[new_fild][type][]" /></td><td><input checked type="checkbox" name="order[new_fild][public][]" /></td><td><input id="order_count" rel="sort_order" type="hidden" name="order[new_fild][order][]" value="'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" /><input type="button" class="button" id="billing_delete" value="Удалить -"/></td>');
|
854 |
-
obj.removeClass('nodrop nodrag');
|
855 |
-
obj.after('<tr class="nodrop nodrag"><td></td><td></td><td></td><td></td><td></td><td></td><td><input type="button" class="button" id="order" value="Добавить +"/></td></tr>');
|
856 |
-
});
|
857 |
-
|
858 |
-
jQuery('.button#billing_delete').live('click',function() {
|
859 |
-
var obj = jQuery(this).parent().parent();
|
860 |
-
var obj_r = obj.parent();
|
861 |
-
obj.remove();
|
862 |
-
obj_r.find("tr").each(function(i, e){
|
863 |
-
jQuery(e).find("td input#order_count").val(i);
|
864 |
-
});
|
865 |
-
});
|
866 |
-
jQuery(document).ready(function() {
|
867 |
-
jQuery(".myTable").tableDnD({
|
868 |
-
onDragClass: "sorthelper",
|
869 |
-
onDrop: function(table, row) {
|
870 |
-
var data = new Object();
|
871 |
-
data.data = new Object();
|
872 |
-
data.key = jQuery(table).find("tr td input").attr("rel");
|
873 |
-
jQuery(row).fadeOut("fast").fadeIn("slow");
|
874 |
-
|
875 |
-
jQuery(table).find("tr").each(function(i, e){
|
876 |
-
var id = jQuery(e).find("td input#order_count").attr("id");
|
877 |
-
data.data[i] = id;
|
878 |
-
jQuery(e).find("td input#order_count").val(i);
|
879 |
-
});
|
880 |
-
}
|
881 |
-
});
|
882 |
-
});
|
883 |
-
</script>
|
884 |
-
<? } ?>
|
885 |
-
|
886 |
-
</div>
|
887 |
-
<?
|
888 |
-
}
|
889 |
-
}
|
890 |
-
}
|
891 |
-
if ( ! function_exists( 'woocommerce_saphali_admin_menu_s_l' ) ) {
|
892 |
-
function woocommerce_saphali_admin_menu_s_l() {
|
893 |
-
add_submenu_page('woocommerce', __('Настройки Saphali WC Lite', 'woocommerce'), __('Saphali WC Lite', 'woocommerce') , 'manage_woocommerce', 'woocommerce_saphali_s_l', 'woocommerce_saphali_page_s_l');
|
894 |
}
|
895 |
}
|
|
|
896 |
$column_count_saphali = get_option('column_count_saphali');
|
897 |
if(!empty($column_count_saphali)) {
|
898 |
global $woocommerce_loop;
|
@@ -904,11 +903,11 @@ if(!empty($column_count_saphali)) {
|
|
904 |
?>
|
905 |
<style type='text/css'>
|
906 |
ul.products li.product {
|
907 |
-
width:<? if($woocommerce_loop['columns'] <= 3 ) echo floor(100/$woocommerce_loop['columns'] - $woocommerce_loop['columns']); elseif($woocommerce_loop['columns'] > 3 )echo floor(100/$woocommerce_loop['columns'] - 4);?>%;
|
908 |
}
|
909 |
</style>
|
910 |
-
<?
|
911 |
}
|
912 |
}
|
913 |
}
|
914 |
-
|
3 |
Plugin Name: Saphali Woocommerce Russian
|
4 |
Plugin URI: http://saphali.com/saphali-woocommerce-plugin-wordpress
|
5 |
Description: Saphali Woocommerce Russian - это бесплатный вордпресс плагин, который добавляет набор дополнений к интернет-магазину на Woocommerce.
|
6 |
+
Version: 1.3.0
|
7 |
Author: Saphali
|
8 |
Author URI: http://saphali.com/
|
9 |
*/
|
31 |
// Подключение валюты и локализации
|
32 |
define('SAPHALI_PLUGIN_DIR_URL',plugin_dir_url(__FILE__));
|
33 |
define('SAPHALI_PLUGIN_DIR_PATH',plugin_dir_path(__FILE__));
|
34 |
+
class saphali_lite {
|
35 |
+
function __construct() {
|
36 |
+
add_action('admin_menu', array($this,'woocommerce_saphali_admin_menu_s_l'), 9);
|
37 |
+
load_plugin_textdomain( 'woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
38 |
+
load_plugin_textdomain( 'themewoocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
39 |
+
|
40 |
+
if(@$_GET['page'] != 'woocommerce_saphali_s_l' && @$_GET['tab'] !=1) {
|
41 |
+
// Hook in
|
42 |
+
add_filter( 'woocommerce_checkout_fields' , array($this,'saphali_custom_override_checkout_fields') );
|
43 |
+
add_filter( 'woocommerce_billing_fields', array($this,'saphali_custom_billing_fields'), 10, 1 );
|
44 |
+
add_filter( 'woocommerce_shipping_fields', array($this,'saphali_custom_shipping_fields'), 10, 1 );
|
45 |
+
add_action('admin_init', array($this,'woocommerce_customer_meta_fields_action'), 20);
|
46 |
+
add_action( 'personal_options_update', array($this,'woocommerce_save_customer_meta_fields_saphali') );
|
47 |
+
add_action( 'edit_user_profile_update', array($this,'woocommerce_save_customer_meta_fields_saphali') );
|
48 |
+
add_action( 'woocommerce_admin_order_data_after_billing_address', array($this,'woocommerce_admin_order_data_after_billing_address_s') );
|
49 |
+
add_action( 'woocommerce_admin_order_data_after_shipping_address', array($this,'woocommerce_admin_order_data_after_shipping_address_s') );
|
50 |
+
add_action( 'woocommerce_admin_order_data_after_order_details', array($this,'woocommerce_admin_order_data_after_order_details_s') );
|
51 |
+
|
52 |
+
add_filter( 'woocommerce_currencies', array($this,'add_inr_currency') );
|
53 |
+
add_filter( 'woocommerce_currency_symbol', array($this,'add_inr_currency_symbol') );
|
54 |
+
}
|
55 |
+
}
|
56 |
+
function woocommerce_customer_meta_fields_action() {
|
57 |
+
add_action( 'show_user_profile', array($this,'woocommerce_customer_meta_fields_s') );
|
58 |
+
add_action( 'edit_user_profile', array($this,'woocommerce_customer_meta_fields_s') );
|
59 |
+
}
|
60 |
+
function woocommerce_customer_meta_fields_s( $user ) {
|
61 |
+
if ( ! current_user_can( 'manage_woocommerce' ) )
|
62 |
+
return;
|
63 |
+
|
64 |
+
$show_fields = $this->woocommerce_get_customer_meta_fields_saphali();
|
65 |
+
if(!empty($show_fields["billing"])) {
|
66 |
+
$show_field["billing"]['title'] = __('Customer Billing Address', 'woocommerce');
|
67 |
+
$show_field["billing"]['fields'] = $show_fields["billing"];
|
68 |
+
}
|
69 |
+
if(!empty($show_fields["shipping"])) {
|
70 |
+
$show_field["shipping"]['title'] = __('Customer Shipping Address', 'woocommerce');
|
71 |
+
$show_field["shipping"]['fields'] = $show_fields["shipping"];
|
72 |
+
}
|
73 |
+
if(is_array($show_field)) {
|
74 |
+
$count = 0; echo '<fieldset>';
|
75 |
+
foreach( $show_field as $fieldset ) :
|
76 |
+
if(!$count) echo '<h2>Дополнительные поля</h2>';
|
77 |
+
$count++;
|
78 |
+
?>
|
79 |
+
<h3><?php echo $fieldset['title']; ?></h3>
|
80 |
+
<table class="form-table">
|
81 |
+
<?php
|
82 |
+
foreach( $fieldset['fields'] as $key => $field ) :
|
83 |
+
?>
|
84 |
+
<tr>
|
85 |
+
<th><label for="<?php echo $key; ?>"><?php echo $field['label']; ?></label></th>
|
86 |
+
<td>
|
87 |
+
<input type="text" name="<?php echo $key; ?>" id="<?php echo $key; ?>" value="<?php echo esc_attr( get_user_meta( $user->ID, $key, true ) ); ?>" class="regular-text" /><br/>
|
88 |
+
<span class="description"><?php echo $field['description']; ?></span>
|
89 |
+
</td>
|
90 |
+
</tr>
|
91 |
+
<?php
|
92 |
+
endforeach;
|
93 |
+
?>
|
94 |
+
</table>
|
95 |
+
<?php
|
96 |
+
endforeach;
|
97 |
+
echo '</fieldset>';
|
98 |
+
}
|
99 |
+
}
|
100 |
+
function woocommerce_saphali_admin_menu_s_l() {
|
101 |
+
add_submenu_page('woocommerce', __('Настройки Saphali WC Lite', 'woocommerce'), __('Saphali WC Lite', 'woocommerce') , 'manage_woocommerce', 'woocommerce_saphali_s_l', array($this,'woocommerce_saphali_page_s_l'));
|
102 |
+
}
|
103 |
function add_inr_currency( $currencies ) {
|
104 |
$currencies['UAH'] = __( 'Ukrainian hryvnia ( grn.)', 'themewoocommerce' );
|
105 |
$currencies['RUR'] = __( 'Russian ruble ( rub.)', 'themewoocommerce' );
|
106 |
$currencies['BYR'] = __( 'Belarusian ruble ( Br.)', 'themewoocommerce' );
|
107 |
+
$currencies['AMD'] = __( 'Armenian dram (Դրամ)', 'themewoocommerce' );
|
108 |
return $currencies;
|
109 |
}
|
110 |
+
function add_inr_currency_symbol( $currency_symbol ) {
|
|
|
|
|
111 |
$currency = get_option( 'woocommerce_currency' );
|
112 |
switch( $currency ) {
|
113 |
+
case 'UAH': $currency_symbol = 'грн.'; break;
|
114 |
+
case 'RUB': $currency_symbol = 'руб.'; break;
|
115 |
+
case 'RUR': $currency_symbol = 'руб.'; break;
|
116 |
+
case 'BYR': $currency_symbol = 'руб.'; break;
|
117 |
+
case 'AMD': $currency_symbol = 'Դ'; break;
|
118 |
}
|
119 |
+
return $currency_symbol;
|
120 |
}
|
121 |
+
function admin_enqueue_scripts_page_saphali() {
|
122 |
+
global $woocommerce;
|
123 |
+
$plugin_url = plugins_url( basename( plugin_dir_path(__FILE__) ), basename( __FILE__ ) );
|
124 |
+
if($_GET['page'] == 'woocommerce_saphali_s_l' && $_GET['tab'] ==1 )
|
125 |
+
wp_enqueue_script( 'tablednd', $plugin_url. '/js/jquery.tablednd.0.5.js', array('jquery'), $woocommerce->version );
|
126 |
+
}
|
127 |
+
function woocommerce_saphali_page_s_l () {
|
128 |
+
?>
|
129 |
+
<div class="wrap woocommerce"><div class="icon32 icon32-woocommerce-reports" id="icon-woocommerce"><br /></div>
|
130 |
+
<h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
|
131 |
+
Настройки Saphali WC
|
132 |
+
</h2>
|
133 |
+
<ul class="subsubsub">
|
134 |
+
|
135 |
+
<li><a href="admin.php?page=woocommerce_saphali_s_l" <?php if($_GET["tab"] == '') echo 'class="current"';?>><span color="red">Дополнительная информация</span></a> | </li>
|
136 |
+
<li><a href="admin.php?page=woocommerce_saphali_s_l&tab=1" <?php if($_GET["tab"] == 1) echo 'class="current"';?>>Управление полями</a> | </li>
|
137 |
+
<li><a href="admin.php?page=woocommerce_saphali_s_l&tab=2" <?php if($_GET["tab"] == 2) echo 'class="current"';?>>Число колонок в каталоге</a></li>
|
138 |
+
|
139 |
+
</ul>
|
140 |
+
<?php if($_GET["tab"] == '') {?>
|
141 |
+
<div class="clear"></div>
|
142 |
+
<h2 class="woo-nav-tab-wrapper">Дополнительная информация</h2>
|
143 |
+
<?php include_once (SAPHALI_PLUGIN_DIR_PATH . 'go_pro.php'); } elseif($_GET["tab"] == 2) {?>
|
144 |
+
<div class="clear"></div>
|
145 |
+
<h2 class="woo-nav-tab-wrapper">Число колонок в каталоге товаров и в рубриках</h2>
|
146 |
+
<?php include_once (SAPHALI_PLUGIN_DIR_PATH . 'count-column.php'); } elseif($_GET["tab"] == 1) {
|
147 |
+
global $woocommerce;
|
148 |
+
if ( empty( $woocommerce->checkout ) ) {
|
149 |
+
|
150 |
+
if ( version_compare( WOOCOMMERCE_VERSION, '2.0', '<' ) ) {
|
151 |
+
include_once( WP_PLUGIN_DIR . '/' . $woocommerce->template_url. 'classes/class-wc-checkout.php' );
|
152 |
+
}
|
153 |
+
else { if(!class_exists('WC_Customer')) $woocommerce->autoload( 'WC_Customer' ); $woocommerce->autoload( 'WC_Checkout' ); }
|
154 |
+
if(class_exists('WC_Checkout')) {
|
155 |
+
if(class_exists('WC_Customer')) $woocommerce->customer = new WC_Customer();
|
156 |
+
$f = new WC_Checkout();
|
157 |
+
}
|
158 |
+
}
|
159 |
+
else $f = $woocommerce->checkout;
|
160 |
+
if($_POST){
|
161 |
+
if($_POST["reset"] != 'All') {
|
162 |
+
// Управление новыми полями
|
163 |
+
|
164 |
+
if(is_array($_POST["billing"]["new_fild"])) {
|
165 |
+
foreach($_POST["billing"]["new_fild"] as $k_nf => $v_nf) {
|
166 |
+
if($k_nf == 'name')
|
167 |
+
foreach($v_nf as $v_nf_f)
|
168 |
+
$new_fild[] = $v_nf_f;
|
169 |
+
else {
|
170 |
+
foreach($v_nf as $k_nf_f => $v_nf_f) {
|
171 |
+
if($k_nf == 'class') {
|
172 |
+
$v_nf_f = array ( $v_nf_f );
|
173 |
+
$addFild["billing"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
174 |
+
} else $addFild["billing"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
175 |
+
//$addFild["billing"][$new_fild[$k_nf_f]]['add_new'] = true;
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
unset($_POST["billing"]["new_fild"]);
|
180 |
+
unset($new_fild);
|
181 |
+
}
|
182 |
+
if(is_array($_POST["shipping"]["new_fild"])) {
|
183 |
+
foreach($_POST["shipping"]["new_fild"] as $k_nf => $v_nf) {
|
184 |
+
if($k_nf == 'name')
|
185 |
+
foreach($v_nf as $v_nf_f)
|
186 |
+
$new_fild[] = $v_nf_f;
|
187 |
+
else {
|
188 |
+
foreach($v_nf as $k_nf_f => $v_nf_f) {
|
189 |
+
if($k_nf == 'class') {
|
190 |
+
$v_nf_f = array ( $v_nf_f );
|
191 |
+
$addFild["shipping"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
192 |
+
} else $addFild["shipping"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
193 |
+
//$addFild["shipping"][$new_fild[$k_nf_f]]['add_new'] = true;
|
194 |
+
}
|
195 |
+
}
|
196 |
+
}
|
197 |
+
unset($_POST["shipping"]["new_fild"]);
|
198 |
+
unset($new_fild);
|
199 |
+
}
|
200 |
+
if(is_array($_POST["order"]["new_fild"])) {
|
201 |
+
foreach($_POST["order"]["new_fild"] as $k_nf => $v_nf) {
|
202 |
+
if($k_nf == 'name')
|
203 |
+
foreach($v_nf as $v_nf_f)
|
204 |
+
$new_fild[] = $v_nf_f;
|
205 |
+
else {
|
206 |
+
foreach($v_nf as $k_nf_f => $v_nf_f) {
|
207 |
+
if($k_nf == 'class') {
|
208 |
+
$v_nf_f = array ( $v_nf_f );
|
209 |
+
$addFild["order"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
210 |
+
} else $addFild["order"][$new_fild[$k_nf_f]][$k_nf] = $v_nf_f;
|
211 |
+
//$addFild["order"][$new_fild[$k_nf_f]]['add_new'] = true;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
}
|
215 |
+
unset($_POST["order"]["new_fild"]);
|
216 |
+
}
|
217 |
+
//END
|
218 |
+
$filds = $f->checkout_fields;
|
219 |
+
if(is_array($filds["billing"]))
|
220 |
+
foreach($filds["billing"] as $key_post => $value_post) {
|
221 |
+
$filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post] = $value_post;
|
222 |
+
if($_POST["billing"][$key_post]['public'] != 'on') {
|
223 |
+
$filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post]["public"] = false;
|
224 |
+
$fild_remove_filter["billing"][] = $key_post;
|
225 |
+
} else {$filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post]["public"] = true;}
|
226 |
+
|
227 |
+
$_POST["billing"][$key_post]['required'] = ($_POST["billing"][$key_post]['required'] == 'on') ? true : false ;
|
228 |
+
|
229 |
+
$_POST["billing"][$key_post]['clear'] = $bool_clear = ($_POST["billing"][$key_post]['clear'] == 'on') ? true : false ;
|
230 |
+
|
231 |
+
foreach($value_post as $k_post=> $v_post){
|
232 |
+
if( $_POST["billing"][$key_post][$k_post] != $v_post && isset($_POST["billing"][$key_post][$k_post]) ) {
|
233 |
+
$filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post][$k_post] = $_POST["billing"][$key_post][$k_post];
|
234 |
+
}
|
235 |
+
}
|
236 |
+
if( $bool_clear ){
|
237 |
+
$filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post]['clear'] = $bool_clear;
|
238 |
+
} elseif(isset($filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post]['clear'])) {
|
239 |
+
unset($filds_new["billing"][$_POST["billing"][$key_post]["order"]][$key_post]['clear']);
|
240 |
+
}
|
241 |
+
unset($_POST["billing"][$key_post]);
|
242 |
+
}
|
243 |
+
if(is_array($filds["shipping"]))
|
244 |
+
foreach($filds["shipping"] as $key_post => $value_post) {
|
245 |
+
$filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post] = $value_post;
|
246 |
+
|
247 |
+
if($_POST["shipping"][$key_post]['public'] != 'on') {
|
248 |
+
$filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post]["public"] = false;
|
249 |
+
$fild_remove_filter["shipping"][] = $key_post;
|
250 |
+
} else {$filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post]["public"] = true;}
|
251 |
+
|
252 |
+
$_POST["shipping"][$key_post]['clear'] = $bool_clear = ($_POST["shipping"][$key_post]['clear'] == 'on') ? true : false ;
|
253 |
+
|
254 |
+
$_POST["shipping"][$key_post]['required'] = ($_POST["shipping"][$key_post]['required'] == 'on') ? true : false ;
|
255 |
+
|
256 |
+
foreach($value_post as $k_post=> $v_post){
|
257 |
+
if( $_POST["shipping"][$key_post][$k_post] != $v_post && isset($_POST["shipping"][$key_post][$k_post]) ) {
|
258 |
+
$filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post][$k_post] = $_POST["shipping"][$key_post][$k_post];
|
259 |
+
}
|
260 |
+
}
|
261 |
+
if( $bool_clear ){
|
262 |
+
$filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post]['clear'] = $bool_clear;
|
263 |
+
} elseif(isset($filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post]['clear'])) {
|
264 |
+
unset($filds_new["shipping"][$_POST["shipping"][$key_post]["order"]][$key_post]['clear']);
|
265 |
+
}
|
266 |
+
unset($_POST["shipping"][$key_post]);
|
267 |
+
}
|
268 |
+
if(is_array($filds["order"]))
|
269 |
+
foreach($filds["order"] as $key_post => $value_post) {
|
270 |
+
$filds_new["order"][$_POST["order"][$key_post]["order"]][$key_post] = $value_post;
|
271 |
+
if($_POST["order"][$key_post]['public'] != 'on') {
|
272 |
+
$filds_new["order"][$_POST["order"][$key_post]["order"]][$key_post]["public"] = false;
|
273 |
+
$fild_remove_filter["order"][] = $key_post;
|
274 |
+
} else {$filds_new["order"][$_POST["order"][$key_post]["order"]][$key_post]["public"] = true;}
|
275 |
+
|
276 |
|
277 |
+
$_POST["order"][$key_post]['required'] = ($_POST["order"][$key_post]['required'] == 'on') ? true : false ;
|
278 |
+
|
279 |
+
|
280 |
+
foreach($value_post as $k_post=> $v_post){
|
281 |
+
if( $_POST["order"][$key_post][$k_post] != $v_post && isset($_POST["order"][$key_post][$k_post]) ) {
|
282 |
+
$filds_new["order"][$_POST["order"][$key_post]["order"]][$key_post][$k_post] = $_POST["order"][$key_post][$k_post];
|
283 |
+
}
|
284 |
+
}
|
285 |
+
unset($_POST["order"][$key_post]);
|
286 |
+
}
|
287 |
+
// Управление публикацией
|
288 |
+
if(!empty($_POST["billing"])) {
|
289 |
+
foreach($_POST["billing"] as $k_post => $v_post) {
|
290 |
+
if($v_post["public"] != 'on' )
|
291 |
+
$fild_remove_filter["billing"][] = $k_post;
|
292 |
+
}
|
293 |
+
}
|
294 |
+
if(!empty($_POST["shipping"])) {
|
295 |
+
foreach($_POST["shipping"] as $k_post => $v_post) {
|
296 |
+
if($v_post["public"] != 'on' )
|
297 |
+
$fild_remove_filter["shipping"][] = $k_post;
|
298 |
+
}
|
299 |
+
}
|
300 |
+
if(!empty($_POST["order"])) {
|
301 |
+
foreach($_POST["order"] as $k_post => $v_post) {
|
302 |
+
if($v_post["public"] != 'on' )
|
303 |
+
$fild_remove_filter["order"][] = $k_post;
|
304 |
+
}
|
305 |
+
}
|
306 |
+
//END Управление публикацией
|
307 |
+
$filds_finish["billing"] = $filds_finish["shipping"] = $filds_finish["order"] = array();
|
308 |
|
309 |
+
for($i = 0; $i<count($filds_new["billing"]); $i++) {
|
310 |
+
if(isset($filds_new["billing"][$i]))
|
311 |
+
$filds_finish["billing"] = $filds_finish["billing"] + $filds_new["billing"][$i];
|
312 |
+
}
|
313 |
+
for($i = 0; $i<count($filds_new["shipping"]); $i++) {
|
314 |
+
if(isset($filds_new["shipping"][$i]))
|
315 |
+
$filds_finish["shipping"] = $filds_finish["shipping"] + $filds_new["shipping"][$i];
|
316 |
+
}
|
317 |
+
for($i = 0; $i<count($filds_new["order"]); $i++) {
|
318 |
+
if(isset($filds_new["order"][$i]))
|
319 |
+
$filds_finish["order"] = $filds_finish["order"] + $filds_new["order"][$i];
|
320 |
+
}
|
321 |
+
|
322 |
+
if(is_array($_POST["billing"]))
|
323 |
+
$filds_finish["billing"] = $filds_finish["billing"] + $_POST["billing"];
|
324 |
+
if(is_array($_POST["shipping"]))
|
325 |
+
$filds_finish["shipping"] = $filds_finish["shipping"] + $_POST["shipping"];
|
326 |
+
if(is_array($_POST["order"]))
|
327 |
+
$filds_finish["order"] = $filds_finish["order"] + $_POST["order"];
|
328 |
+
|
329 |
+
if(is_array($addFild["billing"]))
|
330 |
+
$filds_finish["billing"] = $filds_finish["billing"] + $addFild["billing"];
|
331 |
+
if(is_array($addFild["shipping"]))
|
332 |
+
$filds_finish["shipping"] = $filds_finish["shipping"] + $addFild["shipping"]+ $_POST["shipping"];
|
333 |
+
if(is_array($addFild["order"]))
|
334 |
+
$filds_finish["order"] = $filds_finish["order"] + $addFild["order"] + $_POST["order"];
|
335 |
+
|
336 |
+
|
337 |
+
|
338 |
+
$filds_finish_filter = $filds_finish;
|
339 |
+
if(is_array($fild_remove_filter["billing"])) {
|
340 |
+
foreach($fild_remove_filter["billing"] as $v_filt){
|
341 |
+
unset($filds_finish_filter["billing"][$v_filt]);
|
342 |
+
}
|
343 |
+
}
|
344 |
+
if(is_array($fild_remove_filter["shipping"])) {
|
345 |
+
foreach($fild_remove_filter["shipping"] as $v_filt){
|
346 |
+
unset($filds_finish_filter["shipping"][$v_filt]);
|
347 |
+
}
|
348 |
+
}
|
349 |
+
if(is_array($fild_remove_filter["order"])) {
|
350 |
+
foreach($fild_remove_filter["order"] as $v_filt){
|
351 |
+
unset($filds_finish_filter["order"][$v_filt]);
|
352 |
+
}
|
353 |
+
}
|
354 |
+
if(!update_option('woocommerce_saphali_filds',$filds_finish))add_option('woocommerce_saphali_filds',$filds_finish);
|
355 |
+
if(!update_option('woocommerce_saphali_filds_filters',$filds_finish_filter))add_option('woocommerce_saphali_filds_filters',$filds_finish_filter);
|
356 |
+
} else {
|
357 |
+
delete_option('woocommerce_saphali_filds');
|
358 |
+
delete_option('woocommerce_saphali_filds_filters');
|
359 |
+
}
|
360 |
+
}
|
361 |
|
362 |
+
?>
|
363 |
+
<div class="clear"></div>
|
364 |
+
<h3 class="nav-tab-wrapper woo-nav-tab-wrapper" style="text-align: center;">Управление полями на странице заказа и на странице профиля</h3>
|
365 |
+
|
366 |
+
<h2 align="center">Реквизиты оплаты</h2>
|
367 |
+
<form action="" method="post">
|
368 |
+
<table class="wp-list-table widefat fixed posts" cellspacing="0">
|
369 |
+
<thead>
|
370 |
+
<tr>
|
371 |
+
<th width="130px">Название<img class="help_tip" data-tip="Название поля должно быть уни­ка­ль­ным (не должно повторяться)." src="<?php bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /></th>
|
372 |
+
<th width="130px">Заголовок</th>
|
373 |
+
<th width="130px">Текст в поле</th>
|
374 |
+
<th width="35px">Clear<img class="help_tip" data-tip="Указывает на то, что следующее поле за текущим, будет начинаться с новой строки." src="<?php bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /> </th>
|
375 |
+
<th width="130px">Класс поля<img class="help_tip" data-tip="<h3 style='margin:0;padding:0'>Задает стиль текущего поля</h3><ul style='text-align: left;'><li><span style='color: #000'>form-row-first</span> – первый в строке;</li><li><span style='color: #000'>form-row-last</span> – последний в строке.</li></ul><hr /><span style='color: #000'>ЕСЛИ ОСТАВИТЬ ПУСТЫМ</span>, то поле будет отображаться на всю ширину. Соответственно, в предыдущем поле (которое выше) нужно отметить «Clear»." src="<?php bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /></th>
|
376 |
+
<th width="40px">Обя­за­те­ль­ное</th>
|
377 |
+
|
378 |
+
<th width="40px">Опу­бли­ко­вать</th>
|
379 |
+
|
380 |
+
<th width="65px">Удалить/До­ба­вить</th>
|
381 |
+
</tr>
|
382 |
+
</thead>
|
383 |
+
<tfoot>
|
384 |
+
<tr>
|
385 |
+
<th>Название</th>
|
386 |
+
<th>Заголовок</th>
|
387 |
+
<th>Текст в поле</th>
|
388 |
+
<th width="35px">Clear<img class="help_tip" data-tip="Указывает на то, что следующее поле за текущим, будет начинаться с новой строки." src="<?php bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /> </th>
|
389 |
+
<th>Класс поля</th>
|
390 |
+
<th width="40px">Обя­за­те­ль­ное</th>
|
391 |
+
|
392 |
+
<th width="40px">Опу­бли­ко­вать</th>
|
393 |
+
|
394 |
+
<th>Удалить/До­ба­вить</th>
|
395 |
+
</tr>
|
396 |
+
</tfoot>
|
397 |
+
<tbody id="the-list" class="myTable">
|
398 |
+
<?php
|
399 |
|
400 |
+
$count = 0;
|
401 |
+
|
402 |
+
$checkout_fields = get_option('woocommerce_saphali_filds');
|
403 |
+
|
404 |
+
if(is_array($checkout_fields["billing"])) $f->checkout_fields["billing"] = $checkout_fields["billing"];
|
405 |
+
foreach($f->checkout_fields["billing"] as $key => $value) {
|
406 |
+
if(empty($value['public']) && !is_array($checkout_fields["billing"])) $value['public'] = true;
|
407 |
+
?>
|
408 |
+
<tr>
|
409 |
+
<td> <input disabled value='<?php echo $key?>' type="text" name="billing[<?php echo $key?>][name]" /></td>
|
410 |
+
<td><input value='<?php echo $value['label']?>' type="text" name="billing[<?php echo $key?>][label]" /></td>
|
411 |
+
<td><input value='<?php echo $value['placeholder']?>' type="text" name="billing[<?php echo $key?>][placeholder]" /></td>
|
412 |
+
<td><input <?php if($value['clear']) echo 'checked'?> class="<?php echo $value['clear']?>" type="checkbox" name="billing[<?php echo $key?>][clear]" /></td>
|
413 |
+
<td><?php if(is_array($value['class'])) { foreach($value['class'] as $v_class) { ?>
|
414 |
+
<input value='<?php echo $v_class;?>' type="text" name="billing[<?php echo $key?>][class][]" /> <?php } } else { ?>
|
415 |
+
<input value='' type="text" name="billing[<?php echo $key?>][class][]" /> <?php
|
416 |
+
} ?></td>
|
417 |
+
<td><input <?php if($value['required']) echo 'checked'?> type="checkbox" name="billing[<?php echo $key?>][required]" /></td>
|
418 |
+
<td><input <?php if($value['public']) echo 'checked';?> type="checkbox" name="billing[<?php echo $key?>][public]" /></td>
|
419 |
+
|
420 |
+
<td><input rel="sort_order" id="order_count" type="hidden" name="billing[<?php echo $key?>][order]" value="<?php echo $count?>" />
|
421 |
+
<input type="button" class="button" id="billing_delete" value="Удалить -"/></td>
|
422 |
+
</tr>
|
423 |
+
<?php $count++;
|
424 |
+
}
|
425 |
?>
|
426 |
+
<tr class="nodrop nodrag">
|
427 |
+
<td></td>
|
428 |
+
<td></td>
|
429 |
+
<td></td>
|
430 |
+
<td></td>
|
431 |
+
<td></td>
|
432 |
+
<td></td>
|
433 |
+
|
434 |
+
<td></td>
|
435 |
+
|
436 |
+
<td><input type="button" class="button" id="billing" value="Добавить +"/></td>
|
437 |
+
</tr>
|
438 |
+
</tbody>
|
439 |
+
</table>
|
440 |
+
|
441 |
+
<h2 align="center">Реквизиты доставки</h2>
|
442 |
+
<table class="wp-list-table widefat fixed posts" cellspacing="0">
|
443 |
+
<thead>
|
444 |
<tr>
|
445 |
+
<th width="130px">Название<img class="help_tip" data-tip="Название поля должно быть уни­ка­ль­ным (не должно повторяться)." src="<?php bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /></th>
|
446 |
+
<th width="130px">Заголовок</th>
|
447 |
+
<th width="130px">Текст в поле</th>
|
448 |
+
<th width="35px">Clear<img class="help_tip" data-tip="Указывает на то, что следующее поле за текущим, будет начинаться с новой строки." src="<?php bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /> </th>
|
449 |
+
<th width="130px">Класс поля<img class="help_tip" data-tip="<h3 style='margin:0;padding:0'>Задает стиль текущего поля</h3><ul style='text-align: left;'><li><span style='color: #000'>form-row-first</span> – первый в строке;</li><li><span style='color: #000'>form-row-last</span> – последний в строке.</li></ul><hr /><span style='color: #000'>ЕСЛИ ОСТАВИТЬ ПУСТЫМ</span>, то поле будет отображаться на всю ширину. Соответственно, в предыдущем поле (которое выше) нужно отметить «Clear»." src="<?php bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /></th>
|
450 |
+
<th width="40px">Обя­за­те­ль­ное</th>
|
451 |
+
|
452 |
+
<th width="40px">Опу­бли­ко­вать</th>
|
453 |
+
|
454 |
+
<th width="65px">Удалить/До­ба­вить</th>
|
455 |
</tr>
|
456 |
+
</thead>
|
457 |
+
<tfoot>
|
458 |
+
<tr>
|
459 |
+
<th>Название</th>
|
460 |
+
<th>Заголовок</th>
|
461 |
+
<th>Текст в поле</th>
|
462 |
+
<th width="56px">Clear<img class="help_tip" data-tip="Указывает на то, что следующее поле за текущим, будет начинаться с новой строки." src="<?php bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /> </th>
|
463 |
+
<th>Класс поля</th>
|
464 |
+
<th width="40px">Обя­за­те­ль­ное</th>
|
465 |
+
|
466 |
+
<th width="40px">Опу­бли­ко­вать</th>
|
467 |
+
|
468 |
+
<th>Удалить/До­ба­вить</th>
|
469 |
+
</tr>
|
470 |
+
</tfoot>
|
471 |
+
<tbody id="the-list" class="myTable">
|
472 |
+
<?php $count = 0;
|
473 |
+
if(is_array($checkout_fields["shipping"])) $f->checkout_fields["shipping"] = $checkout_fields["shipping"];
|
474 |
+
foreach($f->checkout_fields["shipping"] as $key => $value) {
|
475 |
+
if( empty($value['public']) && !is_array($checkout_fields["shipping"]) ) $value['public'] = true;
|
476 |
+
?>
|
477 |
+
<tr>
|
478 |
+
<td><input disabled value=<?php echo $key?> type="text" name="shipping[<?php echo $key?>][name]" /></td>
|
479 |
+
<td><input value='<?php echo $value['label']?>' type="text" name="shipping[<?php echo $key?>][label]" /></td>
|
480 |
+
<td><input value='<?php echo $value['placeholder']?>' type="text" name="shipping[<?php echo $key?>][placeholder]" /></td>
|
481 |
+
<td><input <?php if($value['clear']) echo 'checked'?> class="<?php echo $value['clear']?>" type="checkbox" name="shipping[<?php echo $key?>][clear]" /></td>
|
482 |
+
<td><?php if(is_array($value['class'])) { foreach($value['class'] as $v_class) { ?>
|
483 |
+
|
484 |
+
<input value='<?php echo $v_class;?>' type="text" name="shipping[<?php echo $key?>][class][]" /> <?php } } else { ?>
|
485 |
+
<input value='' type="text" name="shipping[<?php echo $key?>][class][]" /> <?php
|
486 |
+
} ?></td>
|
487 |
+
<td><input <?php if($value['required']) echo 'checked'?> type="checkbox" name="shipping[<?php echo $key?>][required]" /></td>
|
488 |
+
<td><input <?php if($value['public']) echo 'checked';?> type="checkbox" name="shipping[<?php echo $key?>][public]" /></td>
|
489 |
+
|
490 |
+
<td><input rel="sort_order" id="order_count" type="hidden" name="shipping[<?php echo $key?>][order]" value="<?php echo $count?>" /><input type="button" class="button" id="billing_delete" value="Удалить -"/></td>
|
491 |
+
</tr>
|
492 |
+
<?php $count++;
|
493 |
+
}
|
494 |
+
?>
|
495 |
+
<tr class="nodrop nodrag">
|
496 |
+
<td></td>
|
497 |
+
<td></td>
|
498 |
+
<td></td>
|
499 |
+
|
500 |
+
<td></td>
|
501 |
+
<td></td>
|
502 |
+
<td></td>
|
503 |
+
<td></td>
|
504 |
+
|
505 |
+
<td><input type="button" class="button" id="shipping" value="Добавить +"/></td>
|
506 |
+
</tr>
|
507 |
+
|
508 |
+
</tbody>
|
509 |
+
</table>
|
510 |
+
<br />
|
511 |
+
<h2 align="center">Дополнительные поля</h2>
|
512 |
+
<table class="wp-list-table widefat fixed posts" cellspacing="0">
|
513 |
+
<thead>
|
514 |
+
<tr>
|
515 |
+
<th width="130px">Название<img class="help_tip" data-tip="Название поля должно быть уни­ка­ль­ным (не должно повторяться)." src="<?php bloginfo('wpurl');?>/wp-content/plugins/woocommerce/assets/images/help.png" /></th>
|
516 |
+
<th width="130px">Заголовок</th>
|
517 |
+
<th width="130px">Текст в поле</th>
|
518 |
+
<th width="130px">Класс поля</th>
|
519 |
+
<th width="130px">Тип поля</th>
|
520 |
+
<th width="40px">Опу­бли­ко­вать</th>
|
521 |
+
|
522 |
+
<th width="65px">Удалить/До­ба­вить</th>
|
523 |
+
</tr>
|
524 |
+
</thead>
|
525 |
+
<tfoot>
|
526 |
+
<tr>
|
527 |
+
<th>Название</th>
|
528 |
+
<th>Заголовок</th>
|
529 |
+
<th>Текст в поле</th>
|
530 |
+
<th>Класс поля</th>
|
531 |
+
<th>Тип поля</th>
|
532 |
+
<th width="40px">Опу­бли­ко­вать</th>
|
533 |
+
|
534 |
+
<th>Удалить/До­ба­вить</th>
|
535 |
+
</tr>
|
536 |
+
</tfoot>
|
537 |
+
<tbody id="the-list" class="myTable">
|
538 |
+
<?php $count = 0;
|
539 |
+
if(is_array($checkout_fields["order"])) $f->checkout_fields["order"] = $checkout_fields["order"];
|
540 |
+
foreach($f->checkout_fields["order"] as $key => $value) {
|
541 |
+
if(empty($value['public']) && !is_array($checkout_fields["order"])) $value['public'] = true;
|
542 |
+
?>
|
543 |
+
<tr>
|
544 |
+
<td><input disabled value=<?php echo $key?> type="text" name="order[<?php echo $key?>][name]" /></td>
|
545 |
+
<td><input value='<?php echo $value['label']?>' type="text" name="order[<?php echo $key?>][label]" /></td>
|
546 |
+
<td><input value='<?php echo $value['placeholder']?>' type="text" name="order[<?php echo $key?>][placeholder]" /></td>
|
547 |
+
|
548 |
+
<td><?php if(is_array($value['class'])) { foreach($value['class'] as $v_class) { ?>
|
549 |
+
|
550 |
+
<input value='<?php echo $v_class;?>' type="text" name="order[<?php echo $key?>][class][]" /> <?php } } else { ?>
|
551 |
+
<input value='' type="text" name="order[<?php echo $key?>][class][]" /> <?php
|
552 |
+
} ?></td>
|
553 |
+
<td><input value='<?php echo $value['type']?>' type="text" name="order[<?php echo $key?>][type]" /></td>
|
554 |
+
<td><input <?php if($value['public']) echo 'checked';?> type="checkbox" name="order[<?php echo $key?>][public]" /></td>
|
555 |
+
|
556 |
+
<td><input id="order_count" rel="sort_order" type="hidden" name="order[<?php echo $key?>][order]" value="<?php echo $count?>" /><input type="button" class="button" id="billing_delete" value="Удалить -"/></td>
|
557 |
+
</tr>
|
558 |
+
<?php $count++;
|
559 |
+
}
|
560 |
+
?>
|
561 |
+
<tr class="nodrop nodrag">
|
562 |
+
<td></td>
|
563 |
+
<td></td>
|
564 |
+
<td></td>
|
565 |
+
<td></td>
|
566 |
+
<td></td>
|
567 |
+
<td></td>
|
568 |
+
|
569 |
+
|
570 |
+
<td><input type="button" class="button" id="order" value="Добавить +"/></td>
|
571 |
+
</tr>
|
572 |
+
</tbody>
|
573 |
+
</table><br />
|
574 |
+
<input type="submit" class="button alignleft" value="Сохранить"/>
|
575 |
+
</form>
|
576 |
+
<form action="" method="post">
|
577 |
+
<input type="hidden" name="reset" value="All"/>
|
578 |
+
<input type="submit" class="button alignright" value="Восстановить поля по умолчанию"/>
|
579 |
+
</form>
|
580 |
+
<style type="text/css">
|
581 |
+
#tiptip_content{font-size:11px;color:#fff;padding:4px 8px;background:#a2678c;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;box-shadow:1px 1px 3px rgba(0,0,0,0.1);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,0.1);text-align:center}#tiptip_content code{background:#855c76;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#a2678c}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#a2678c}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#a2678c}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#a2678c}img.help_tip{vertical-align:middle;margin:0 0 0 3px}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_left{padding-right:5px}#tiptip_content{font-size:11px;color:#fff;padding:4px 8px;background:#a2678c;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;box-shadow:1px 1px 3px rgba(0,0,0,0.1);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:1px 1px 3px rgba(0,0,0,0.1);text-align:center}#tiptip_content code{background:#855c76;padding:1px}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#a2678c}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#a2678c}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#a2678c}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#a2678c}
|
582 |
+
input[disabled="disabled"], input[disabled=""] {
|
583 |
+
background:none repeat scroll 0 0 #EAEAEA !important;
|
584 |
+
color:#636060 !important;
|
585 |
+
}
|
586 |
+
</style>
|
587 |
+
<script type="text/javascript">
|
588 |
+
(function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery);
|
589 |
+
jQuery(".tips, .help_tip").tipTip({
|
590 |
+
'attribute' : 'data-tip',
|
591 |
+
'fadeIn' : 50,
|
592 |
+
'fadeOut' : 50,
|
593 |
+
'delay' : 200
|
594 |
+
});
|
595 |
+
jQuery('.button#billing').live('click',function() {
|
596 |
+
var obj = jQuery(this).parent().parent();
|
597 |
+
obj.html('<td><input value="billing_new_fild'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" type="text" name="billing[new_fild][name][]" /></td><td><input value="" type="text" name="billing[new_fild][label][]" /></td><td><input value="" type="text" name="billing[new_fild][placeholder][]" /></td><td><input type="checkbox" name="billing[new_fild][clear][]" /></td><td><input value="" type="text" name="billing[new_fild][class][]" /></td><td><input checked type="checkbox" name="billing[new_fild][required][]" /></td><td><input checked type="checkbox" name="billing[new_fild][public][]" /></td><td><input id="order_count" rel="sort_order" type="hidden" name="billing[new_fild][order][]" value="'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" /><input type="button" class="button" id="billing_delete" value="Удалить -"/></td>');
|
598 |
+
obj.removeClass('nodrop nodrag');
|
599 |
+
obj.after('<tr class="nodrop nodrag"><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><input type="button" class="button" id="billing" value="Добавить +"/></td></tr>');
|
600 |
+
});
|
601 |
+
jQuery('.button#shipping').live('click',function() {
|
602 |
+
var obj = jQuery(this).parent().parent();
|
603 |
+
obj.html('<td><input value="shipping_new_fild'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" type="text" name="shipping[new_fild][name][]" /></td><td><input value="" type="text" name="shipping[new_fild][label][]" /></td><td><input value="" type="text" name="shipping[new_fild][placeholder][]" /></td><td><input type="checkbox" name="shipping[new_fild][clear][]" /></td><td><input value="" type="text" name="shipping[new_fild][class][]" /></td><td><input checked type="checkbox" name="shipping[new_fild][required][]" /></td><td><input checked type="checkbox" name="shipping[new_fild][public][]" /></td><td><input id="order_count" rel="sort_order" type="hidden" name="shipping[new_fild][order][]" value="'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" /><input type="button" class="button" id="billing_delete" value="Удалить -"/></td>');
|
604 |
+
obj.removeClass('nodrop nodrag');
|
605 |
+
obj.after('<tr class="nodrop nodrag"><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><input type="button" class="button" id="shipping" value="Добавить +"/></td></tr>');
|
606 |
+
});
|
607 |
+
jQuery('.button#order').live('click',function() {
|
608 |
+
var obj = jQuery(this).parent().parent();
|
609 |
+
obj.html('<td><input value="order_new_fild'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" type="text" name="order[new_fild][name][]" /></td><td><input value="" type="text" name="order[new_fild][label][]" /></td><td><input value="" type="text" name="order[new_fild][placeholder][]" /></td><td><input value="" type="text" name="order[new_fild][class][]" /></td><td><input checked type="text" name="order[new_fild][type][]" /></td><td><input checked type="checkbox" name="order[new_fild][public][]" /></td><td><input id="order_count" rel="sort_order" type="hidden" name="order[new_fild][order][]" value="'+(parseInt(obj.parent().find('tr td input#order_count:last').val(),10)+1)+'" /><input type="button" class="button" id="billing_delete" value="Удалить -"/></td>');
|
610 |
+
obj.removeClass('nodrop nodrag');
|
611 |
+
obj.after('<tr class="nodrop nodrag"><td></td><td></td><td></td><td></td><td></td><td></td><td><input type="button" class="button" id="order" value="Добавить +"/></td></tr>');
|
612 |
+
});
|
613 |
+
|
614 |
+
jQuery('.button#billing_delete').live('click',function() {
|
615 |
+
var obj = jQuery(this).parent().parent();
|
616 |
+
var obj_r = obj.parent();
|
617 |
+
obj.remove();
|
618 |
+
obj_r.find("tr").each(function(i, e){
|
619 |
+
jQuery(e).find("td input#order_count").val(i);
|
620 |
+
});
|
621 |
+
});
|
622 |
+
jQuery(document).ready(function() {
|
623 |
+
jQuery(".myTable").tableDnD({
|
624 |
+
onDragClass: "sorthelper",
|
625 |
+
onDrop: function(table, row) {
|
626 |
+
var data = new Object();
|
627 |
+
data.data = new Object();
|
628 |
+
data.key = jQuery(table).find("tr td input").attr("rel");
|
629 |
+
jQuery(row).fadeOut("fast").fadeIn("slow");
|
630 |
+
|
631 |
+
jQuery(table).find("tr").each(function(i, e){
|
632 |
+
var id = jQuery(e).find("td input#order_count").attr("id");
|
633 |
+
data.data[i] = id;
|
634 |
+
jQuery(e).find("td input#order_count").val(i);
|
635 |
+
});
|
636 |
+
}
|
637 |
+
});
|
638 |
+
});
|
639 |
+
</script>
|
640 |
+
<?php } ?>
|
641 |
+
|
642 |
+
</div>
|
643 |
<?php
|
|
|
644 |
}
|
|
|
|
|
645 |
function woocommerce_get_customer_meta_fields_saph_ed() {
|
646 |
+
$show_fields = apply_filters('woocommerce_customer_meta_fields', array(
|
647 |
+
'billing' => array(
|
648 |
+
'title' => __('Customer Billing Address', 'woocommerce'),
|
649 |
+
'fields' => array(
|
650 |
+
'billing_first_name' => array(
|
651 |
+
'label' => __('First name', 'woocommerce'),
|
652 |
+
'description' => ''
|
653 |
+
),
|
654 |
+
'billing_last_name' => array(
|
655 |
+
'label' => __('Last name', 'woocommerce'),
|
656 |
+
'description' => ''
|
657 |
+
),
|
658 |
+
'billing_company' => array(
|
659 |
+
'label' => __('Company', 'woocommerce'),
|
660 |
+
'description' => ''
|
661 |
+
),
|
662 |
+
'billing_address_1' => array(
|
663 |
+
'label' => __('Address 1', 'woocommerce'),
|
664 |
+
'description' => ''
|
665 |
+
),
|
666 |
+
'billing_address_2' => array(
|
667 |
+
'label' => __('Address 2', 'woocommerce'),
|
668 |
+
'description' => ''
|
669 |
+
),
|
670 |
+
'billing_city' => array(
|
671 |
+
'label' => __('City', 'woocommerce'),
|
672 |
+
'description' => ''
|
673 |
+
),
|
674 |
+
'billing_postcode' => array(
|
675 |
+
'label' => __('Postcode', 'woocommerce'),
|
676 |
+
'description' => ''
|
677 |
+
),
|
678 |
+
'billing_state' => array(
|
679 |
+
'label' => __('State/County', 'woocommerce'),
|
680 |
+
'description' => __('Country or state code', 'woocommerce'),
|
681 |
+
),
|
682 |
+
'billing_country' => array(
|
683 |
+
'label' => __('Country', 'woocommerce'),
|
684 |
+
'description' => __('2 letter Country code', 'woocommerce'),
|
685 |
+
),
|
686 |
+
'billing_phone' => array(
|
687 |
+
'label' => __('Telephone', 'woocommerce'),
|
688 |
+
'description' => ''
|
689 |
+
),
|
690 |
+
'billing_email' => array(
|
691 |
+
'label' => __('Email', 'woocommerce'),
|
692 |
+
'description' => ''
|
693 |
+
)
|
694 |
+
)
|
695 |
+
),
|
696 |
+
'shipping' => array(
|
697 |
+
'title' => __('Customer Shipping Address', 'woocommerce'),
|
698 |
+
'fields' => array(
|
699 |
+
'shipping_first_name' => array(
|
700 |
+
'label' => __('First name', 'woocommerce'),
|
701 |
+
'description' => ''
|
702 |
+
),
|
703 |
+
'shipping_last_name' => array(
|
704 |
+
'label' => __('Last name', 'woocommerce'),
|
705 |
+
'description' => ''
|
706 |
+
),
|
707 |
+
'shipping_company' => array(
|
708 |
+
'label' => __('Company', 'woocommerce'),
|
709 |
+
'description' => ''
|
710 |
+
),
|
711 |
+
'shipping_address_1' => array(
|
712 |
+
'label' => __('Address 1', 'woocommerce'),
|
713 |
+
'description' => ''
|
714 |
+
),
|
715 |
+
'shipping_address_2' => array(
|
716 |
+
'label' => __('Address 2', 'woocommerce'),
|
717 |
+
'description' => ''
|
718 |
+
),
|
719 |
+
'shipping_city' => array(
|
720 |
+
'label' => __('City', 'woocommerce'),
|
721 |
+
'description' => ''
|
722 |
+
),
|
723 |
+
'shipping_postcode' => array(
|
724 |
+
'label' => __('Postcode', 'woocommerce'),
|
725 |
+
'description' => ''
|
726 |
+
),
|
727 |
+
'shipping_state' => array(
|
728 |
+
'label' => __('State/County', 'woocommerce'),
|
729 |
+
'description' => __('State/County or state code', 'woocommerce')
|
730 |
+
),
|
731 |
+
'shipping_country' => array(
|
732 |
+
'label' => __('Country', 'woocommerce'),
|
733 |
+
'description' => __('2 letter Country code', 'woocommerce')
|
734 |
+
)
|
735 |
+
)
|
736 |
)
|
737 |
+
));
|
738 |
+
return $show_fields;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
739 |
}
|
740 |
function woocommerce_get_customer_meta_fields_saphali() {
|
741 |
$fieldss = get_option('woocommerce_saphali_filds_filters');
|
742 |
+
$show_fields = $this->woocommerce_get_customer_meta_fields_saph_ed();
|
743 |
if(is_array($fieldss)) {
|
744 |
if(is_array($fieldss["billing"])) {
|
745 |
$billing['fields'] = array();
|
794 |
|
795 |
return $show_fields;
|
796 |
}
|
797 |
+
function woocommerce_save_customer_meta_fields_saphali( $user_id ) {
|
798 |
+
if ( ! current_user_can( 'manage_woocommerce' ) )
|
799 |
+
return $columns;
|
800 |
+
|
801 |
+
$show_fields = $this->woocommerce_get_customer_meta_fields_saphali();
|
802 |
+
if(!empty($show_fields["billing"])) {
|
803 |
+
$save_fields["billing"]['title'] = __('Customer Billing Address', 'woocommerce');
|
804 |
+
$save_fields["billing"]['fields'] = $show_fields["billing"];
|
805 |
+
}
|
806 |
+
if(!empty($show_fields["shipping"])) {
|
807 |
+
$save_fields["shipping"]['title'] = __('Customer Shipping Address', 'woocommerce');
|
808 |
+
$save_fields["shipping"]['fields'] = $show_fields["shipping"];
|
809 |
+
}
|
810 |
+
/* if(!empty($show_fields["order"])) {
|
811 |
+
$save_fields["order"]['title'] = __('Дополнительные поля', 'woocommerce');
|
812 |
+
$save_fields["order"]['fields'] = $show_fields["order"];
|
813 |
+
} */
|
814 |
+
foreach( $save_fields as $fieldset )
|
815 |
+
foreach( $fieldset['fields'] as $key => $field )
|
816 |
+
if ( isset( $_POST[ $key ] ) )
|
817 |
+
update_user_meta( $user_id, $key, trim( esc_attr( $_POST[ $key ] ) ) );
|
818 |
+
}
|
819 |
function woocommerce_admin_order_data_after_billing_address_s($order) {
|
820 |
+
$billing_data = $this->woocommerce_get_customer_meta_fields_saphali();
|
821 |
+
echo '<div class="address">';
|
822 |
if(is_array($billing_data["billing"])) {
|
823 |
foreach ( $billing_data["billing"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
824 |
|
831 |
echo '</div>';
|
832 |
}
|
833 |
function woocommerce_admin_order_data_after_shipping_address_s($order) {
|
834 |
+
$billing_data = $this->woocommerce_get_customer_meta_fields_saphali();
|
835 |
+
echo '<div class="address">';
|
836 |
if(is_array($billing_data["shipping"])) {
|
837 |
foreach ( $billing_data["shipping"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
838 |
|
845 |
echo '</div>';
|
846 |
}
|
847 |
function woocommerce_admin_order_data_after_order_details_s($order) {
|
848 |
+
$billing_data = $this->woocommerce_get_customer_meta_fields_saphali();
|
849 |
+
echo '<div class="address">';
|
850 |
if(is_array($billing_data["order"])) {
|
851 |
foreach ( $billing_data["order"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
852 |
|
860 |
}
|
861 |
echo '</div>';
|
862 |
}
|
|
|
|
|
863 |
function saphali_custom_override_checkout_fields( $fields ) {
|
864 |
|
865 |
$fieldss = get_option('woocommerce_saphali_filds_filters');
|
878 |
return $fields;
|
879 |
}
|
880 |
function saphali_custom_shipping_fields( $fields ) {
|
|
|
881 |
$fieldss = get_option('woocommerce_saphali_filds_filters');
|
882 |
if(is_array($fieldss))
|
883 |
$fields = $fieldss["shipping"];
|
884 |
return $fields;
|
885 |
}
|
886 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
887 |
|
888 |
+
add_action('plugins_loaded', 'woocommerce_lang_s_l', 0);
|
889 |
+
if ( ! function_exists( 'woocommerce_lang_s_l' ) ) {
|
890 |
+
function woocommerce_lang_s_l() {
|
891 |
+
new saphali_lite();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
}
|
893 |
}
|
894 |
+
//END
|
895 |
$column_count_saphali = get_option('column_count_saphali');
|
896 |
if(!empty($column_count_saphali)) {
|
897 |
global $woocommerce_loop;
|
903 |
?>
|
904 |
<style type='text/css'>
|
905 |
ul.products li.product {
|
906 |
+
width:<?php if($woocommerce_loop['columns'] <= 3 ) echo floor(100/$woocommerce_loop['columns'] - $woocommerce_loop['columns']); elseif($woocommerce_loop['columns'] > 3 )echo floor(100/$woocommerce_loop['columns'] - 4);?>%;
|
907 |
}
|
908 |
</style>
|
909 |
+
<?php
|
910 |
}
|
911 |
}
|
912 |
}
|
913 |
+
add_action( 'admin_enqueue_scripts', array('saphali_lite','admin_enqueue_scripts_page_saphali') );
|