Version Description
- .
Download this release
Release Info
Developer | Saphali |
Plugin | Saphali Woocommerce Russian |
Version | 1.3.5 |
Comparing to | |
See all releases |
Code changes from version 1.3.4 to 1.3.5
- languages/themewoocommerce-ru_RU.mo +0 -0
- languages/themewoocommerce-ru_RU.po +23 -4
- languages/woocommerce-ru_RU.mo +0 -0
- languages/woocommerce-ru_RU.po +14 -6
- readme.txt +6 -4
- saphali-woocommerce-lite.php +155 -21
languages/themewoocommerce-ru_RU.mo
CHANGED
Binary file
|
languages/themewoocommerce-ru_RU.po
CHANGED
@@ -3,7 +3,7 @@ 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-
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -100,6 +100,13 @@ msgstr ""
|
|
100 |
"Журнал событий, таких как запросы/ответы на/от сервера Z-Payment, внутри "
|
101 |
"документа <code>woocommerce/logs/zpayment.txt</code>"
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
# @ woocommerce
|
104 |
#: functions.php:40
|
105 |
msgid "Debug Log"
|
@@ -116,8 +123,13 @@ msgid ""
|
|
116 |
"Pay via Qiwi; you can pay with your credit card if you don't have a Qiwi "
|
117 |
"account or terminal."
|
118 |
msgstr ""
|
119 |
-
"
|
120 |
-
"
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
# @ woocommerce
|
123 |
#: functions.php:40
|
@@ -125,7 +137,7 @@ msgid ""
|
|
125 |
"Pay via LiqPay; you can pay with your credit card if you don't have a LiqPay "
|
126 |
"account or terminal."
|
127 |
msgstr ""
|
128 |
-
"
|
129 |
"нет LiqPay аккаунта или через терминал."
|
130 |
|
131 |
msgid ""
|
@@ -172,3 +184,10 @@ msgid ""
|
|
172 |
msgstr ""
|
173 |
"Спасибо за заказ, пожалуйста, нажмите на кнопку внизу, чтобы оплатить при "
|
174 |
"помощи Chronopay"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-06-24 07:34+0200\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
100 |
"Журнал событий, таких как запросы/ответы на/от сервера Z-Payment, внутри "
|
101 |
"документа <code>woocommerce/logs/zpayment.txt</code>"
|
102 |
|
103 |
+
msgid ""
|
104 |
+
"Log Interkassa events, such as IPN requests, inside <code>woocommerce/logs/"
|
105 |
+
"interkassa.txt</code>"
|
106 |
+
msgstr ""
|
107 |
+
"Журнал событий, таких как запросы/ответы на/от сервера Interkassa, внутри "
|
108 |
+
"документа <code>woocommerce/logs/interkassa.txt</code>"
|
109 |
+
|
110 |
# @ woocommerce
|
111 |
#: functions.php:40
|
112 |
msgid "Debug Log"
|
123 |
"Pay via Qiwi; you can pay with your credit card if you don't have a Qiwi "
|
124 |
"account or terminal."
|
125 |
msgstr ""
|
126 |
+
"Оплатить через Qiwi. Вы также можете заплатить пластиковой картой или через "
|
127 |
+
"терминал."
|
128 |
+
|
129 |
+
msgid ""
|
130 |
+
"Pay via Interkassa; you can pay with your credit card if you don't have a "
|
131 |
+
"Interkassa account or terminal."
|
132 |
+
msgstr "Заплатить через Interkassa"
|
133 |
|
134 |
# @ woocommerce
|
135 |
#: functions.php:40
|
137 |
"Pay via LiqPay; you can pay with your credit card if you don't have a LiqPay "
|
138 |
"account or terminal."
|
139 |
msgstr ""
|
140 |
+
"Оплатить через LiqPay. Вы можете заплатить пластиковой картой, если у вас "
|
141 |
"нет LiqPay аккаунта или через терминал."
|
142 |
|
143 |
msgid ""
|
184 |
msgstr ""
|
185 |
"Спасибо за заказ, пожалуйста, нажмите на кнопку внизу, чтобы оплатить при "
|
186 |
"помощи Chronopay"
|
187 |
+
|
188 |
+
msgid ""
|
189 |
+
"Thank you for your order, please click the button below to pay with "
|
190 |
+
"Interkassa."
|
191 |
+
msgstr ""
|
192 |
+
"Спасибо за заказ, пожалуйста, нажмите на кнопку внизу, чтобы оплатить при "
|
193 |
+
"помощи Interkassa."
|
languages/woocommerce-ru_RU.mo
CHANGED
Binary file
|
languages/woocommerce-ru_RU.po
CHANGED
@@ -3,7 +3,7 @@ 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-
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -8200,9 +8200,17 @@ msgstr "Доступно под заказ (повторно)"
|
|
8200 |
msgid "%s units of %s have been backordered in order #%s."
|
8201 |
msgstr "%s шт. из %s были совершены под заказ (повторно) в заказе #%s."
|
8202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8203 |
# @ woocommerce
|
8204 |
-
#:
|
8205 |
-
#: templates/
|
8206 |
-
#:
|
8207 |
-
msgid "
|
8208 |
-
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-05-29 10:43+0200\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
8200 |
msgid "%s units of %s have been backordered in order #%s."
|
8201 |
msgstr "%s шт. из %s были совершены под заказ (повторно) в заказе #%s."
|
8202 |
|
8203 |
+
msgid "Confirm password"
|
8204 |
+
msgstr "Подтвердите пароль"
|
8205 |
+
|
8206 |
+
# @ woocommerce
|
8207 |
+
#: classes/class-wc-order.php:980
|
8208 |
+
msgid "Subtotal:"
|
8209 |
+
msgstr "Итого:"
|
8210 |
+
|
8211 |
# @ woocommerce
|
8212 |
+
#: admin/post-types/writepanels/order-item-html.php:112
|
8213 |
+
#: templates/cart/mini-cart.php:63 templates/cart/totals.php:92
|
8214 |
+
#: templates/checkout/review-order.php:93
|
8215 |
+
msgid "Subtotal"
|
8216 |
+
msgstr "Итого"
|
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
=== Saphali Woocommerce
|
2 |
Contributors: Saphali
|
3 |
Plugin Name: Saphali Woocommerce Russian
|
4 |
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.
|
9 |
-
Stable tag: 1.3.
|
10 |
-
Version: 1.3.
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
@@ -61,6 +61,8 @@ QIWI, Приват24, LiqPay, WebMoney, Яндекс.Деньги, Интерк
|
|
61 |
3. Управление количеством колонок в каталоге товаров и рубриках.
|
62 |
|
63 |
== Changelog ==
|
|
|
|
|
64 |
|
65 |
= 1.3.4 =
|
66 |
* Добавлены валюты: Киргизский сом (сом) и Казахстанский тенге (тңг).
|
1 |
+
=== Saphali Woocommerce Russian ===
|
2 |
Contributors: Saphali
|
3 |
Plugin Name: Saphali Woocommerce Russian
|
4 |
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.6
|
9 |
+
Stable tag: 1.3.5
|
10 |
+
Version: 1.3.5
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
61 |
3. Управление количеством колонок в каталоге товаров и рубриках.
|
62 |
|
63 |
== Changelog ==
|
64 |
+
= 1.3.5 =
|
65 |
+
* Добавлена функция вывода дополнительных полей в письмах и при просмотре заказа покупателем.
|
66 |
|
67 |
= 1.3.4 =
|
68 |
* Добавлены валюты: Киргизский сом (сом) и Казахстанский тенге (тңг).
|
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.3.
|
7 |
Author: Saphali
|
8 |
Author URI: http://saphali.com/
|
9 |
*/
|
@@ -32,11 +32,28 @@ Author URI: http://saphali.com/
|
|
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') );
|
@@ -53,6 +70,7 @@ Author URI: http://saphali.com/
|
|
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') );
|
@@ -113,21 +131,23 @@ Author URI: http://saphali.com/
|
|
113 |
function add_inr_currency_symbol( $symbol ) {
|
114 |
if(!$symbol)
|
115 |
$currency = get_option( 'woocommerce_currency' );
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
|
|
|
|
124 |
}
|
125 |
return $symbol;
|
126 |
}
|
127 |
function admin_enqueue_scripts_page_saphali() {
|
128 |
global $woocommerce;
|
129 |
$plugin_url = plugins_url( basename( plugin_dir_path(__FILE__) ), basename( __FILE__ ) );
|
130 |
-
if($_GET['page'] == 'woocommerce_saphali_s_l' && $_GET['tab'] ==1 )
|
131 |
wp_enqueue_script( 'tablednd', $plugin_url. '/js/jquery.tablednd.0.5.js', array('jquery'), $woocommerce->version );
|
132 |
}
|
133 |
function woocommerce_saphali_page_s_l () {
|
@@ -138,12 +158,12 @@ Author URI: http://saphali.com/
|
|
138 |
</h2>
|
139 |
<ul class="subsubsub">
|
140 |
|
141 |
-
<li><a href="admin.php?page=woocommerce_saphali_s_l" <?php if($_GET["tab"]
|
142 |
-
<li><a href="admin.php?page=woocommerce_saphali_s_l&tab=1" <?php if($_GET["tab"] == 1) echo 'class="current"';?>>Управление полями</a> | </li>
|
143 |
-
<li><a href="admin.php?page=woocommerce_saphali_s_l&tab=2" <?php if($_GET["tab"] == 2) echo 'class="current"';?>>Число колонок в каталоге</a></li>
|
144 |
|
145 |
</ul>
|
146 |
-
<?php if($_GET["tab"]
|
147 |
<div class="clear"></div>
|
148 |
<h2 class="woo-nav-tab-wrapper">Дополнительная информация</h2>
|
149 |
<?php include_once (SAPHALI_PLUGIN_DIR_PATH . 'go_pro.php'); } elseif($_GET["tab"] == 2) {?>
|
@@ -789,13 +809,22 @@ Author URI: http://saphali.com/
|
|
789 |
}
|
790 |
if(!is_array($show_fields['billing']['fields'])) { $show_fields['billing']['fields'] = array(); }
|
791 |
$show_fields['billing']['title'] = $show_fields['billing']['title'];
|
|
|
792 |
$show_fields['billing'] = /* $show_fields['billing']['fields'] + */ $billing['fields'];
|
793 |
|
794 |
if(!is_array($show_fields['shipping']['fields'])) { $show_fields['shipping']['fields'] = array(); }
|
795 |
$show_fields['shipping']['title'] = $show_fields['shipping']['title'];
|
|
|
796 |
$show_fields['shipping'] = /* $show_fields['shipping']['fields'] + */ $shipping['fields'];
|
|
|
|
|
797 |
|
798 |
-
|
|
|
|
|
|
|
|
|
|
|
799 |
$show_fields['order'] = /* $show_fields['order']['fields'] + */ $orders['fields'];
|
800 |
|
801 |
return $show_fields;
|
@@ -830,7 +859,7 @@ Author URI: http://saphali.com/
|
|
830 |
|
831 |
$field_name = '_'.$key;
|
832 |
|
833 |
-
if (
|
834 |
|
835 |
endforeach;
|
836 |
}
|
@@ -844,7 +873,7 @@ Author URI: http://saphali.com/
|
|
844 |
|
845 |
$field_name = '_'.$key;
|
846 |
|
847 |
-
if (
|
848 |
|
849 |
endforeach;
|
850 |
}
|
@@ -858,9 +887,9 @@ Author URI: http://saphali.com/
|
|
858 |
|
859 |
$field_name = '_'.$key;
|
860 |
|
861 |
-
if (
|
862 |
|
863 |
-
echo '<div class="form-field form-field-wide"><label>'. $field['label']. ':</label>' . $order->order_custom_fields[$field_name][0].'</div>';
|
864 |
|
865 |
endforeach;
|
866 |
}
|
@@ -889,6 +918,111 @@ Author URI: http://saphali.com/
|
|
889 |
$fields = $fieldss["shipping"];
|
890 |
return $fields;
|
891 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
}
|
893 |
|
894 |
add_action('plugins_loaded', 'woocommerce_lang_s_l', 0);
|
@@ -918,7 +1052,7 @@ if(!empty($column_count_saphali)) {
|
|
918 |
}
|
919 |
add_action("wp_head", '_print_script_columns', 10, 1);
|
920 |
function _print_script_columns() {
|
921 |
-
if(
|
922 |
?>
|
923 |
<style type="text/css">
|
924 |
@font-face { font-family: "Rubl Sign"; src: url(http://www.artlebedev.ru/;-)/ruble.eot); }
|
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.5
|
7 |
Author: Saphali
|
8 |
Author URI: http://saphali.com/
|
9 |
*/
|
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 |
+
var $email_order_id;
|
36 |
function __construct() {
|
37 |
add_action('admin_menu', array($this,'woocommerce_saphali_admin_menu_s_l'), 9);
|
38 |
load_plugin_textdomain( 'woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
39 |
load_plugin_textdomain( 'themewoocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
40 |
+
|
41 |
+
add_action( 'woocommerce_thankyou', array( &$this, 'order_pickup_location' ), 20 );
|
42 |
+
add_action( 'woocommerce_view_order', array( &$this, 'order_pickup_location' ), 20 );
|
43 |
+
|
44 |
+
add_action( 'woocommerce_after_template_part', array( &$this, 'email_pickup_location' ), 10, 3 );
|
45 |
+
|
46 |
+
add_action( 'woocommerce_order_status_pending_to_processing_notification', array( &$this, 'store_order_id' ), 1 );
|
47 |
+
add_action( 'woocommerce_order_status_pending_to_completed_notification', array( &$this, 'store_order_id' ), 1 );
|
48 |
+
add_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( &$this, 'store_order_id' ), 1 );
|
49 |
+
add_action( 'woocommerce_order_status_failed_to_processing_notification', array( &$this, 'store_order_id' ), 1 );
|
50 |
+
add_action( 'woocommerce_order_status_failed_to_completed_notification', array( &$this, 'store_order_id' ), 1 );
|
51 |
+
add_action( 'woocommerce_order_status_completed_notification', array( &$this, 'store_order_id' ), 1 );
|
52 |
+
add_action( 'woocommerce_new_customer_note_notification', array( &$this, 'store_order_id' ), 1 );
|
53 |
+
|
54 |
+
add_filter( 'woocommerce_order_formatted_billing_address', array($this,'formatted_billing_address') , 10 , 2);
|
55 |
+
add_filter( 'woocommerce_order_formatted_shipping_address', array($this,'formatted_shipping_address') , 10 , 2);
|
56 |
+
|
57 |
if(@$_GET['page'] != 'woocommerce_saphali_s_l' && @$_GET['tab'] !=1) {
|
58 |
// Hook in
|
59 |
add_filter( 'woocommerce_checkout_fields' , array($this,'saphali_custom_override_checkout_fields') );
|
70 |
add_filter( 'woocommerce_currency_symbol', array($this,'add_inr_currency_symbol') );
|
71 |
}
|
72 |
}
|
73 |
+
|
74 |
function woocommerce_customer_meta_fields_action() {
|
75 |
add_action( 'show_user_profile', array($this,'woocommerce_customer_meta_fields_s') );
|
76 |
add_action( 'edit_user_profile', array($this,'woocommerce_customer_meta_fields_s') );
|
131 |
function add_inr_currency_symbol( $symbol ) {
|
132 |
if(!$symbol)
|
133 |
$currency = get_option( 'woocommerce_currency' );
|
134 |
+
if(isset($currency)) {
|
135 |
+
switch( $currency ) {
|
136 |
+
case 'UAH': $symbol = 'грн.'; break;
|
137 |
+
case 'RUB': $symbol = '<span class="rur">p<span>уб.</span></span>'; break;
|
138 |
+
case 'RUR': $symbol = 'руб.'; break;
|
139 |
+
case 'BYR': $symbol = 'руб.'; break;
|
140 |
+
case 'AMD': $symbol = 'Դ'; break;
|
141 |
+
case 'KGS': $symbol = 'сом'; break;
|
142 |
+
case 'KZT': $symbol = 'тңг'; break;
|
143 |
+
}
|
144 |
}
|
145 |
return $symbol;
|
146 |
}
|
147 |
function admin_enqueue_scripts_page_saphali() {
|
148 |
global $woocommerce;
|
149 |
$plugin_url = plugins_url( basename( plugin_dir_path(__FILE__) ), basename( __FILE__ ) );
|
150 |
+
if( isset($_GET['page']) && $_GET['page'] == 'woocommerce_saphali_s_l' && (isset($_GET['tab']) && $_GET['tab'] ==1) )
|
151 |
wp_enqueue_script( 'tablednd', $plugin_url. '/js/jquery.tablednd.0.5.js', array('jquery'), $woocommerce->version );
|
152 |
}
|
153 |
function woocommerce_saphali_page_s_l () {
|
158 |
</h2>
|
159 |
<ul class="subsubsub">
|
160 |
|
161 |
+
<li><a href="admin.php?page=woocommerce_saphali_s_l" <?php if(empty($_GET["tab"])) echo 'class="current"';?>><span color="red">Дополнительная информация</span></a> | </li>
|
162 |
+
<li><a href="admin.php?page=woocommerce_saphali_s_l&tab=1" <?php if(!empty($_GET["tab"]) && $_GET["tab"] == 1) echo 'class="current"';?>>Управление полями</a> | </li>
|
163 |
+
<li><a href="admin.php?page=woocommerce_saphali_s_l&tab=2" <?php if(!empty($_GET["tab"]) && $_GET["tab"] == 2) echo 'class="current"';?>>Число колонок в каталоге</a></li>
|
164 |
|
165 |
</ul>
|
166 |
+
<?php if( empty($_GET["tab"]) ) {?>
|
167 |
<div class="clear"></div>
|
168 |
<h2 class="woo-nav-tab-wrapper">Дополнительная информация</h2>
|
169 |
<?php include_once (SAPHALI_PLUGIN_DIR_PATH . 'go_pro.php'); } elseif($_GET["tab"] == 2) {?>
|
809 |
}
|
810 |
if(!is_array($show_fields['billing']['fields'])) { $show_fields['billing']['fields'] = array(); }
|
811 |
$show_fields['billing']['title'] = $show_fields['billing']['title'];
|
812 |
+
if(isset($billing['billing']))
|
813 |
$show_fields['billing'] = /* $show_fields['billing']['fields'] + */ $billing['fields'];
|
814 |
|
815 |
if(!is_array($show_fields['shipping']['fields'])) { $show_fields['shipping']['fields'] = array(); }
|
816 |
$show_fields['shipping']['title'] = $show_fields['shipping']['title'];
|
817 |
+
if(isset($shipping['fields']))
|
818 |
$show_fields['shipping'] = /* $show_fields['shipping']['fields'] + */ $shipping['fields'];
|
819 |
+
|
820 |
+
if(!(@is_array($show_fields['order']['fields']))) {
|
821 |
|
822 |
+
$show_fields['order']['fields'] = array();
|
823 |
+
|
824 |
+
$show_fields['order']['title'] = 'Дополнительные поля';
|
825 |
+
|
826 |
+
}
|
827 |
+
if(isset($orders['fields']))
|
828 |
$show_fields['order'] = /* $show_fields['order']['fields'] + */ $orders['fields'];
|
829 |
|
830 |
return $show_fields;
|
859 |
|
860 |
$field_name = '_'.$key;
|
861 |
|
862 |
+
if ( @$order->order_custom_fields[$field_name][0] ) echo '<p><strong>'.$field['label'].':</strong> '.$order->order_custom_fields[$field_name][0].'</p>';
|
863 |
|
864 |
endforeach;
|
865 |
}
|
873 |
|
874 |
$field_name = '_'.$key;
|
875 |
|
876 |
+
if ( @$order->order_custom_fields[$field_name][0] ) echo '<p><strong>'.$field['label'].':</strong> '.$order->order_custom_fields[$field_name][0].'</p>';
|
877 |
|
878 |
endforeach;
|
879 |
}
|
887 |
|
888 |
$field_name = '_'.$key;
|
889 |
|
890 |
+
if ( @$order->order_custom_fields[$field_name][0] )
|
891 |
|
892 |
+
echo '<div class="form-field form-field-wide"><label>'. $field['label']. ':</label> ' . $order->order_custom_fields[$field_name][0].'</div>';
|
893 |
|
894 |
endforeach;
|
895 |
}
|
918 |
$fields = $fieldss["shipping"];
|
919 |
return $fields;
|
920 |
}
|
921 |
+
public function store_order_id( $arg ) {
|
922 |
+
if ( is_int( $arg ) ) $this->email_order_id = $arg;
|
923 |
+
elseif ( is_array( $arg ) && array_key_exists( 'order_id', $arg ) ) $this->email_order_id = $arg['order_id'];
|
924 |
+
}
|
925 |
+
public function email_pickup_location( $template_name, $template_path, $located ) {
|
926 |
+
global $_shipping_data, $_billing_data;
|
927 |
+
if ( $template_name == 'emails/email-addresses.php' && $this->email_order_id ) {
|
928 |
+
|
929 |
+
$order = new WC_Order( $this->email_order_id );
|
930 |
+
|
931 |
+
$billing_data = $this->woocommerce_get_customer_meta_fields_saphali();
|
932 |
+
echo '<div class="address">';
|
933 |
+
|
934 |
+
if(is_array($billing_data["billing"]) && !$_billing_data) {
|
935 |
+
foreach ( $billing_data["billing"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
936 |
+
$field_name = '_'.$key;
|
937 |
+
if ( $order->order_custom_fields[$field_name][0] )
|
938 |
+
echo '<div class="form-field form-field-wide"><label><strong>'. $field['label']. ':</strong></label> ' . $order->order_custom_fields[$field_name][0].'</div>';
|
939 |
+
endforeach;
|
940 |
+
}
|
941 |
+
if(is_array($billing_data["shipping"]) && !$_shipping_data) {
|
942 |
+
foreach ( $billing_data["shipping"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
943 |
+
$field_name = '_'.$key;
|
944 |
+
if ( $order->order_custom_fields[$field_name][0] )
|
945 |
+
echo '<div class="form-field form-field-wide"><label><strong>'. $field['label']. ':</strong></label> ' . $order->order_custom_fields[$field_name][0].'</div>';
|
946 |
+
endforeach;
|
947 |
+
}
|
948 |
+
if(is_array($billing_data["order"])) {
|
949 |
+
foreach ( $billing_data["order"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
950 |
+
|
951 |
+
$field_name = '_'.$key;
|
952 |
+
|
953 |
+
if ( @$order->order_custom_fields[$field_name][0] )
|
954 |
+
|
955 |
+
echo '<div class="form-field form-field-wide"><label><strong>'. $field['label']. ':</strong></label> ' . $order->order_custom_fields[$field_name][0].'</div>';
|
956 |
+
|
957 |
+
endforeach;
|
958 |
+
}
|
959 |
+
echo '</div>';
|
960 |
+
}
|
961 |
+
}
|
962 |
+
function formatted_billing_address($address, $order) {
|
963 |
+
global $billing_data, $_billing_data;
|
964 |
+
if( empty($billing_data) )
|
965 |
+
$billing_data = $this->woocommerce_get_customer_meta_fields_saphali();
|
966 |
+
if(is_array($billing_data["billing"])) {
|
967 |
+
$_billing_data = true;
|
968 |
+
foreach ( $billing_data["billing"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
969 |
+
$field_name = '_'.$key;
|
970 |
+
if ( @$order->order_custom_fields[$field_name][0] )
|
971 |
+
echo '<label><strong>'. $field['label']. ':</strong></label> ' . $order->order_custom_fields[$field_name][0].'<br />';
|
972 |
+
endforeach;
|
973 |
+
}
|
974 |
+
return $address;
|
975 |
+
}
|
976 |
+
function formatted_shipping_address($address, $order) {
|
977 |
+
global $billing_data, $_shipping_data;
|
978 |
+
if( empty($billing_data) )
|
979 |
+
$billing_data = $this->woocommerce_get_customer_meta_fields_saphali();
|
980 |
+
if(is_array($billing_data["shipping"])) {
|
981 |
+
$_shipping_data = true;
|
982 |
+
foreach ( $billing_data["shipping"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
983 |
+
$field_name = '_'.$key;
|
984 |
+
if ( @$order->order_custom_fields[$field_name][0] ) {
|
985 |
+
echo '<label><strong>'. $field['label']. ':</strong></label> ' . $order->order_custom_fields[$field_name][0].'<br />';
|
986 |
+
$address[$key] = $order->order_custom_fields[$field_name][0];
|
987 |
+
}
|
988 |
+
endforeach;
|
989 |
+
}
|
990 |
+
return $address;
|
991 |
+
}
|
992 |
+
function order_pickup_location($order_id) {
|
993 |
+
global $_billing_data, $_shipping_data;
|
994 |
+
$order = new WC_Order( $order_id );
|
995 |
+
|
996 |
+
if ( is_object($order) ) {
|
997 |
+
|
998 |
+
$billing_data = $this->woocommerce_get_customer_meta_fields_saphali();
|
999 |
+
|
1000 |
+
echo '<div class="address">';
|
1001 |
+
|
1002 |
+
if(is_array($billing_data["billing"]) && !$_billing_data) {
|
1003 |
+
foreach ( $billing_data["billing"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
1004 |
+
$field_name = '_'.$key;
|
1005 |
+
if ( $order->order_custom_fields[$field_name][0] )
|
1006 |
+
echo '<div class="form-field form-field-wide"><label><strong>'. $field['label']. ':</strong></label> ' . $order->order_custom_fields[$field_name][0].'</div>';
|
1007 |
+
endforeach;
|
1008 |
+
}
|
1009 |
+
if(is_array($billing_data["shipping"]) && !$_shipping_data) {
|
1010 |
+
foreach ( $billing_data["shipping"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
1011 |
+
$field_name = '_'.$key;
|
1012 |
+
if ( $order->order_custom_fields[$field_name][0] )
|
1013 |
+
echo '<div class="form-field form-field-wide"><label><strong>'. $field['label']. ':</strong></label> ' . $order->order_custom_fields[$field_name][0].'</div>';
|
1014 |
+
endforeach;
|
1015 |
+
}
|
1016 |
+
if(is_array($billing_data["order"]) ) {
|
1017 |
+
foreach ( $billing_data["order"] as $key => $field ) : if (isset($field['show']) && !$field['show']) continue;
|
1018 |
+
$field_name = '_'.$key;
|
1019 |
+
if ( @$order->order_custom_fields[$field_name][0] )
|
1020 |
+
echo '<div class="form-field form-field-wide"><label><strong>'. $field['label']. ':</strong></label> ' . $order->order_custom_fields[$field_name][0].'</div>';
|
1021 |
+
endforeach;
|
1022 |
+
}
|
1023 |
+
echo '</div>';
|
1024 |
+
}
|
1025 |
+
}
|
1026 |
}
|
1027 |
|
1028 |
add_action('plugins_loaded', 'woocommerce_lang_s_l', 0);
|
1052 |
}
|
1053 |
add_action("wp_head", '_print_script_columns', 10, 1);
|
1054 |
function _print_script_columns() {
|
1055 |
+
if(apply_filters( 'woocommerce_currency', get_option('woocommerce_currency') ) != 'RUB') return;
|
1056 |
?>
|
1057 |
<style type="text/css">
|
1058 |
@font-face { font-family: "Rubl Sign"; src: url(http://www.artlebedev.ru/;-)/ruble.eot); }
|