forms->get_objects(); ?>
to_array(), EXTR_PREFIX_ALL, "f"); } else { extract($fetch_row[$f_RowNum], EXTR_PREFIX_ALL, "f"); } foreach($iteration_RecordTemplate[$f_RowNum] as $value) { extract($value); } eval($cc_env["convert2txt"]); ob_start(); /* Конец служебной части */?> to_array(), EXTR_PREFIX_ALL, "f"); } else { extract($fetch_row[$f_RowNum], EXTR_PREFIX_ALL, "f"); } foreach($iteration_RecordTemplate[$f_RowNum] as $value) { extract($value); } eval($cc_env["convert2txt"]); ob_start(); /* Конец служебной части */?> set_catalogue_id($catalogue); ?>
ui->toolbar()->left() ?> add_text('#' . $f_RowID) ?> ui->html->li()->div($f_ContactName)->icon('user nc--dark') ?> add_btn("mailto:{$f_Email}", $f_Email)->icon('mod-subscriber nc--dark') ?> add_btn($SUB_FOLDER . $HTTP_ROOT_PATH . "modules/netshop/export/cml2_orders.php?order_id=" . $f_RowID . "&catalogue_id=" . $catalogue, 'Экспорт в CommerceML2') ?>
Телефон:     Адрес: ,
get_items() as $item): ?>
' target='_blank'>
"", 'suffix' => "", 'active' => "%PAGE", 'unactive' => "%PAGE", 'divider' => " | ", )) ?>
get_order_table_name(); $last_order_status = $db->get_var("SELECT MAX(`Message_ID`) FROM `$order_table`"); if ($text_filter <= $last_order_status) { $query_where_conditions[] = "a.`Message_ID` = " . (int)$text_filter; $order_status = -1; } } // (б) Возможно, номер телефона (начиная с шестизначного) if (strlen($text_filter) > 5 && preg_match('/^[\d\s\-\.\(\)\+]+$/', $text_filter)) { $phone_digits = preg_split('//', preg_replace('/\D/', '', $text_filter)); $phone_regexp = join('[^0-9]*', $phone_digits); $query_where_conditions[] = "a.`Phone` REGEXP '$phone_regexp'"; } $text_filter_escaped = $db->escape($text_filter); // (в) Email? if (strpos($text_filter, "@") !== false) { $query_where_conditions[] = "a.`Email` LIKE '%$text_filter_escaped%'"; } // (г) может, это логин? $auth_by = nc_core('AUTHORIZE_BY'); $user_id = $db->get_var("SELECT `User_ID` FROM `User` WHERE `$auth_by` = '$text_filter_escaped'"); if ($user_id) { $query_where_conditions[] = "a.`User_ID` = $user_id"; } // (д) имя клиента? if (!is_numeric($text_filter)) { $query_where_conditions[] = "a.`ContactName` LIKE '%$text_filter_escaped%'"; } $query_where = "(" . join(" OR ", $query_where_conditions) . ")"; } /* * order_status: * -1: любые заказы * 0: новые заказы * >0: ID статуса заказа */ if (!isset($order_status)) { $order_status = 0; // "NEW" } if ($order_status != -1) { if ($order_status > 0) { $query_where .= " AND a.Status = " . (int)$order_status; } else { $query_where .= " AND (a.Status IS NULL OR a.Status = 0)"; // new orders } } if (!is_object($perm) || !$perm->isSupervisor()) { if ($AUTH_USER_ID) { $query_where .= " AND a.User_ID = {$AUTH_USER_ID} "; } else { $query_where .= " AND 1 = 0"; } }?> $warnText"; } $netshop = nc_netshop::get_instance($catalogue); $order_component_id = $netshop->get_setting('OrderComponentID'); // same as $classID $order_component = new nc_component($order_component_id); $order = $netshop->load_order($message); $special_fields = array('DeliveryMethod', 'DeliveryCost', 'PaymentMethod', 'PaymentCost'); ?>
token->get_input() ?>
get_fields() as $field_info) { if (in_array($field_info['name'], $special_fields) || $field_info['edit_type'] == 3) { continue; } echo '
', nc_put_field($field_info['name'], '', $order_component_id, true), '
'; } // Таблица с составом заказа ------------------------------------------- ?>
: get_setting('Currencies', $f_OrderCurrency) ?>
get_items() as $item) { echo "\n", // Название "\n", // Цена "\n", // Скидка "\n", // Цена со скидкой "\n", // Количество "\n", // Стоимость "\n", "\n"; } // Итого по товарам ------------------------------------------------ echo "\n", "\n", "\n", "\n"; // Скидки на корзину ----------------------------------------------- echo "\n", "\n", "\n", "\n"; // Доставка -------------------------------------------------------- echo "\n", "\n", "\n", "\n"; // Оплата ---------------------------------------------------------- echo "\n", "\n", "\n", "\n"; // Общий итог ------------------------------------------------------ echo "", "", "", "\n"; ?>
", ($item['ItemID'] ? "" . htmlspecialchars($item['ItemID']) . "   " : ""), "", htmlspecialchars($item['Vendor']), " ", htmlspecialchars($item['Name']), " ", htmlspecialchars($item['VariantName']), "", "", "", "", ""; // Дополнительная информация о применённых скидках if ($item['Discounts']) { echo "
", "?", "
"; foreach ($item['Discounts'] as $discount) { echo "
", ($discount['id'] ? "" . htmlspecialchars($discount['name']) . "" : htmlspecialchars($discount['name']) ), " — ", $netshop->format_price($discount['sum']); echo "
"; } echo "
"; } echo "
", "", "", "", "", "", "
", NETCAT_MODULE_NETSHOP_ITEM_COST, "", "", "
", NETCAT_MODULE_NETSHOP_DISCOUNT, "   "; if ($order->get_cart_discount_sum()) { echo "
", "?", "
"; foreach ($order->get_cart_discounts() as $discount) { echo "
", htmlspecialchars($discount['name']), " — ", $netshop->format_price($discount['sum']); echo "
"; } echo "
"; } echo "
", "", "", "
", NETCAT_MODULE_NETSHOP_DELIVERY, ": "; if ($f_DeliveryMethod) { try { $delivery_method = new nc_netshop_delivery_method($f_DeliveryMethod); echo $delivery_method->get('name'); } catch (nc_record_exception $e) { } } echo "", "", "
", NETCAT_MODULE_NETSHOP_PAYMENT, ": "; if ($f_PaymentMethod) { try { $payment_method = new nc_netshop_payment_method($f_PaymentMethod); echo $payment_method->get('name'); } catch (nc_record_exception $e) { } } echo "", "", "
" . NETCAT_MODULE_NETSHOP_SUM . "", "", "

load_order($message); // Сохранить изменения в списке товаров /** @var nc_input $input */ $input = nc_core('input'); $items = new nc_netshop_item_collection(); foreach ($input->fetch_post('item') as $class_id => $tmp) { foreach ($tmp as $message_id => $item_data) { $item_data['Class_ID'] = $class_id; $item_data['Message_ID'] = $message_id; $items->add(new nc_netshop_item($item_data)); } } $order->save_items($items); // Сохранить изменение скидки на корзину $cart_discount_sum = $input->fetch_post('cart_discount_sum'); if ($cart_discount_sum != $input->fetch_post('previous_cart_discount_sum')) { $order->update_cart_discount($cart_discount_sum); } // Обработать изменение статуса if ($input->fetch_post('previous_status') != $f_Status) { $netshop->mailer->process_order_status_change($order); } if ($inside_admin && !$isNaked) { ob_end_clean(); header('Location: ' . $goBackLink . '&inside_admin=1'); exit; } else { echo NETCAT_MODERATION_MSG_OBJCHANGED, "

", $goBack; }?>