本文整理汇总了PHP中fn_get_statuses函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_get_statuses函数的具体用法?PHP fn_get_statuses怎么用?PHP fn_get_statuses使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_get_statuses函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: apiUpdateOrder
public static function apiUpdateOrder($order, $response)
{
if (!defined('ORDER_MANAGEMENT')) {
define('ORDER_MANAGEMENT', true);
}
if (!empty($order['status'])) {
$statuses = fn_get_statuses(STATUSES_ORDER, false, true);
if (!isset($statuses[$order['status']])) {
$response->addError('ERROR_OBJECT_UPDATE', str_replace('[object]', 'orders', __('twgadmin_wrong_api_object_data')));
} else {
fn_change_order_status($order['order_id'], $order['status']);
}
}
$cart = array();
fn_clear_cart($cart, true);
$customer_auth = fn_fill_auth(array(), array(), false, 'C');
fn_form_cart($order['order_id'], $cart, $customer_auth);
$cart['order_id'] = $order['order_id'];
// update only profile data
$profile_data = fn_check_table_fields($order, 'user_profiles');
$cart['user_data'] = fn_array_merge($cart['user_data'], $profile_data);
$cart['user_data'] = fn_array_merge($cart['user_data'], $order);
fn_calculate_cart_content($cart, $customer_auth, 'A', true, 'I');
if (!empty($order['details'])) {
db_query('UPDATE ?:orders SET details = ?s WHERE order_id = ?i', $order['details'], $order['order_id']);
}
if (!empty($order['notes'])) {
$cart['notes'] = $order['notes'];
}
fn_update_payment_surcharge($cart, $customer_auth);
list($order_id, $process_payment) = fn_place_order($cart, $customer_auth, 'save');
return array($order_id, $process_payment);
}
开发者ID:askzap,项目名称:ultimate,代码行数:33,代码来源:TwigmoOrder.php
示例2: fn_google_analytics_change_order_status
function fn_google_analytics_change_order_status(&$status_to, &$status_from, &$order_info)
{
if (Registry::get('addons.google_analytics.track_ecommerce') == 'N' || AREA != 'A') {
return false;
}
$order_statuses = fn_get_statuses(STATUSES_ORDER, array(), true, true);
if ($order_statuses[$status_to]['params']['inventory'] == 'D' && $order_statuses[$status_from]['params']['inventory'] == 'I') {
// decrease amount
fn_google_anaylitics_send(fn_google_analytics_get_tracking_code($order_info['company_id']), $order_info, false);
} elseif ($order_statuses[$status_to]['params']['inventory'] == 'I' && $order_statuses[$status_from]['params']['inventory'] == 'D') {
// increase amount
fn_google_anaylitics_send(fn_google_analytics_get_tracking_code($order_info['company_id']), $order_info, true);
}
}
开发者ID:askzap,项目名称:ultimate,代码行数:14,代码来源:func.php
示例3: fn_google_analytics_change_order_status
function fn_google_analytics_change_order_status($status_to, $status_from, $order_info)
{
if (Registry::get('addons.google_analytics.track_ecommerce') == 'N') {
return false;
}
$order_statuses = fn_get_statuses(STATUSES_ORDER, false, true, true);
if ($order_statuses[$status_to]['inventory'] == 'D' && $order_statuses[$status_from]['inventory'] == 'I') {
// decrease amount
fn_google_anaylitics_send(Registry::get('addons.google_analytics.tracking_code'), $order_info, false);
} elseif ($order_statuses[$status_to]['inventory'] == 'I' && $order_statuses[$status_from]['inventory'] == 'D') {
// increase amount
fn_google_anaylitics_send(Registry::get('addons.google_analytics.tracking_code'), $order_info, true);
}
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:14,代码来源:func.php
示例4: index
public function index($id = '', $params = array())
{
$lang_code = $this->safeGet($params, 'lang_code', DEFAULT_LANGUAGE);
$type = !empty($params['type']) ? $params['type'] : STATUSES_ORDER;
if (!empty($id)) {
$data = fn_get_status_by_id($id, $lang_code);
if (empty($data)) {
$status = Response::STATUS_NOT_FOUND;
} else {
$status = Response::STATUS_OK;
}
} else {
$items_per_page = $this->safeGet($params, 'items_per_page', Registry::get('settings.Appearance.admin_elements_per_page'));
$page = $this->safeGet($params, 'page', 1);
$data = fn_get_statuses($type, array(), false, false, $lang_code);
$data = array_values($data);
if ($items_per_page) {
$data = array_slice($data, ($page - 1) * $items_per_page, $items_per_page);
}
$data = array('statuses' => $data, 'params' => array('items_per_page' => $items_per_page, 'page' => $page, 'total_items' => count($data)));
$status = Response::STATUS_OK;
}
return array('status' => $status, 'data' => $data);
}
开发者ID:askzap,项目名称:ultimate,代码行数:24,代码来源:Statuses.php
示例5: fn_settings_variants_addons_rus_unisender_order_status_sms
function fn_settings_variants_addons_rus_unisender_order_status_sms()
{
$lists = array();
$order_statuses = fn_get_statuses(STATUSES_ORDER, array(), true, true);
foreach ($order_statuses as $key => $value) {
$lists[$key] = $value['description'];
}
return $lists;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:9,代码来源:func.php
示例6: getOrderSectionsInfo
public final function getOrderSectionsInfo($date_periods, $total_periods, $orders, $sort_by, $sort_order)
{
$order_sections = array();
$section_names = array();
$order_totals = array();
$show_empty_sections = false;
if ($sort_by == 'date') {
$last_date = min($date_periods);
foreach (array_keys($date_periods) as $period_id) {
$section_names[$period_id] = self::getOrderPeriodName($period_id);
}
foreach ($orders as $order) {
$selected_period_id = '';
if ($order['timestamp'] > TIME) {
$selected_period_id = 'future';
} elseif ($order['timestamp'] < $last_date) {
$selected_period_id = 'past';
} else {
foreach ($date_periods as $period_id => $start_date) {
if ($order['timestamp'] > $start_date) {
$selected_period_id = $period_id;
break;
}
}
}
if ($selected_period_id != '') {
$order_sections[$selected_period_id][] = $order;
$order_totals[$selected_period_id] = isset($order_totals[$selected_period_id]) ? $order_totals[$selected_period_id] + $order['total'] : $order['total'];
}
}
if (isset($order_sections['future'])) {
$section_names = array('future' => self::getOrderPeriodName('future')) + $section_names;
}
if (isset($order_sections['past'])) {
$section_names['past'] = self::getOrderPeriodName('more_than_year');
}
if ($sort_order == 'asc') {
$section_names = array_reverse($section_names, true);
}
$show_empty_sections = true;
} elseif ($sort_by == 'status') {
$section_names = fn_get_statuses(STATUSES_ORDER, true);
ksort($section_names);
if ($sort_order == 'desc') {
$section_names = array_reverse($section_names);
}
foreach ($orders as $order) {
$selected_period_id = $order['status'];
$order_sections[$selected_period_id][] = $order;
$order_totals[$selected_period_id] = isset($order_totals[$selected_period_id]) ? $order_totals[$selected_period_id] + $order['total'] : $order['total'];
}
$show_empty_sections = true;
} elseif ($sort_by == 'total') {
$min_total = min($total_periods);
$section_names = array();
foreach ($total_periods as $subtotal) {
$section_names['more_' . $subtotal] = __('more_than') . ' ' . fn_format_price($subtotal);
}
$section_names['less'] = __('less_than') . ' ' . fn_format_price($min_total);
reset($total_periods);
foreach ($orders as $order) {
if ($order['total'] < $min_total) {
$selected_period_id = 'less';
} else {
foreach ($total_periods as $subtotal) {
if ($order['total'] > $subtotal) {
$selected_period_id = 'more_' . $subtotal;
break;
}
}
}
if ($selected_period_id) {
$order_sections[$selected_period_id][] = $order;
$order_totals[$selected_period_id] = isset($order_totals[$selected_period_id]) ? $order_totals[$selected_period_id] + $order['total'] : $order['total'];
}
}
if ($sort_order == 'asc') {
$section_names = array_reverse($section_names);
}
}
return array($order_sections, $section_names, $order_totals, $show_empty_sections);
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:82,代码来源:OrderMethods.php
示例7: fn_promotion_check_existence
/**
* Check if the promotion is already used by customer.
*
* @param int $promotion_id
* @param array $cart
* @return int|bool
*/
function fn_promotion_check_existence($promotion_id, &$cart)
{
static $statuses = null;
if (is_null($statuses)) {
$order_statuses = fn_get_statuses(STATUSES_ORDER, array(), true);
foreach ($order_statuses as $status) {
if ($status['params']['inventory'] == 'D') {
// decreasing (positive) status
$statuses[] = $status['status'];
}
}
}
if (!$statuses) {
return false;
}
$udata = $cart['user_data'];
fn_fill_user_fields($udata);
if (defined('ORDER_MANAGEMENT') && !empty($cart['order_id'])) {
$order_management_condition = db_quote(' order_id != ?i AND ', $cart['order_id']);
} else {
$order_management_condition = '';
}
$exists = db_get_field("SELECT ((firstname = ?s) + (lastname = ?s) + (b_city = ?s) + (b_state = ?s) + (b_country = ?s) + (b_zipcode = ?s) + (email = ?s) * 6) as r FROM ?:orders WHERE ?p FIND_IN_SET(?i, promotion_ids) AND status IN (?a) HAVING r >= ?i LIMIT 1", $udata['firstname'], $udata['lastname'], $udata['b_city'], $udata['b_state'], $udata['b_country'], $udata['b_zipcode'], $udata['email'], $order_management_condition, $promotion_id, $statuses, PROMOTION_MIN_MATCHES);
return $exists;
}
开发者ID:askzap,项目名称:ultimate,代码行数:32,代码来源:fn.promotions.php
示例8: array
}
$response->returnResponse();
}
}
if ($mode == 'post') {
if ($_REQUEST['action'] == 'get') {
$object_name = '';
$condition = array();
$options = array('lang_code' => $lang_code);
$sortings = array();
$result = array();
$is_paginate = false;
$total_items = 0;
$items_per_page = !empty($_REQUEST['items_per_page']) ? $_REQUEST['items_per_page'] : TWG_RESPONSE_ITEMS_LIMIT;
if ($object == 'statuses') {
$order_statuses = fn_get_statuses(STATUSES_ORDER, array(), false, false, $lang_code);
$api_statuses = array();
foreach ($order_statuses as $k => $v) {
$status = array('code' => $k, 'description' => $v['description'], 'color' => '#28ABF6');
if ($k == 'C' || $k == 'P') {
$status['color'] = '#97CF4D';
} elseif ($k == 'D' || $k == 'F') {
$status['color'] = '#FF5215';
} elseif ($k == 'I') {
$status['color'] = '#D2D2D2';
} elseif ($k == 'O') {
$status['color'] = '#FF9522';
}
$api_statuses[] = $status;
}
$result['orders']['status'] = $api_statuses;
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:31,代码来源:twigmo.php
示例9: fn_settings_variants_addons_call_requests_order_status
function fn_settings_variants_addons_call_requests_order_status()
{
$data = array('' => ' -- ');
foreach (fn_get_statuses(STATUSES_ORDER) as $status) {
$data[$status['status']] = $status['description'];
}
return $data;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:8,代码来源:func.php
示例10: fn_get_status_data
/**
* Gets full information about a particular status
* @param string $status One letter status code
* @param string $type One letter status type
* @param int $object_id Recurring billing: ID of an object to be checked for subscriptions
* @param string $lang_code Language code
* @param int $company_id Company identifier
* @return array Status data
*/
function fn_get_status_data($status, $type, $object_id = 0, $lang_code = DESCR_SL, $company_id = 0)
{
fn_set_hook('get_status_data_pre', $status, $type, $object_id, $lang_code, $company_id);
if (empty($status) || empty($type)) {
return array();
}
$status_data = fn_get_statuses($type, !is_array($status) ? (array) $status : $status, false, false, $lang_code, $company_id);
$status_data = reset($status_data);
fn_set_hook('get_status_data_post', $status_data, $status, $type, $object_id, $lang_code, $company_id);
return $status_data;
}
开发者ID:arpad9,项目名称:bygmarket,代码行数:20,代码来源:fn.common.php
示例11: fn_delete_call_request
fn_delete_call_request($request_id);
}
}
}
if ($mode == 'delete') {
if ($_REQUEST['request_id']) {
fn_delete_call_request($_REQUEST['request_id']);
}
}
if ($mode == 'update_status') {
if (!empty($_REQUEST['id']) && !empty($_REQUEST['status'])) {
db_query("UPDATE ?:call_requests SET status = ?s WHERE request_id = ?i", $_REQUEST['status'], $_REQUEST['id']);
fn_set_notification('N', __('notice'), __('status_changed'));
}
if (empty($_REQUEST['return_url'])) {
exit;
} else {
return array(CONTROLLER_STATUS_REDIRECT, $_REQUEST['return_url']);
}
}
return array(CONTROLLER_STATUS_OK, 'call_requests.manage');
}
if ($mode == 'manage') {
$params = array_merge(array('items_per_page' => Registry::get('settings.Appearance.admin_elements_per_page')), $_REQUEST);
$params['company_id'] = Registry::get('runtime.company_id');
list($call_requests, $search) = fn_get_call_requests($params, DESCR_SL);
$statuses = db_get_list_elements('call_requests', 'status', true, DESCR_SL, 'call_requests.status.');
$order_statuses = fn_get_statuses(STATUSES_ORDER);
$responsibles = fn_call_requests_get_responsibles();
Tygh::$app['view']->assign('call_requests', $call_requests)->assign('search', $search)->assign('call_request_statuses', $statuses)->assign('order_statuses', $order_statuses)->assign('responsibles', $responsibles);
}
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:call_requests.php
示例12: fn_gift_registry_change_order_status
function fn_gift_registry_change_order_status($status_to, $status_from, &$order_info)
{
$order_statuses = fn_get_statuses(STATUSES_ORDER, false, true);
if ($order_statuses[$status_to]['inventory'] == 'D' && $order_statuses[$status_from]['inventory'] == 'I') {
// decrease amount
$sign = '+';
} elseif ($order_statuses[$status_to]['inventory'] == 'I' && $order_statuses[$status_from]['inventory'] == 'D') {
// increase amount
$sign = '-';
}
if (!empty($sign)) {
foreach ($order_info['items'] as $v) {
if (is_array($v['extra']) && !empty($v['extra']['events'])) {
foreach ($v['extra']['events'] as $item_id => $amount) {
db_query("UPDATE ?:giftreg_event_products SET ordered_amount = ordered_amount {$sign} ?i WHERE item_id = ?i", $amount, $item_id);
}
}
}
}
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:20,代码来源:func.php
示例13: fn_order_notification
/**
* Send order notification
*
* @param array $order_info order information
* @param array $edp_data information about downloadable products
* @param mixed $force_notification user notification flag (true/false), if not set, will be retrieved from status parameters
* @return array structured data
*/
function fn_order_notification(&$order_info, $edp_data = array(), $force_notification = array())
{
static $notified = array();
if (!empty($notified[$order_info['order_id']][$order_info['status']]) && $notified[$order_info['order_id']][$order_info['status']] || $order_info['status'] == STATUS_INCOMPLETED_ORDER || $order_info['status'] == STATUS_PARENT_ORDER) {
return true;
}
if (!is_array($force_notification)) {
$force_notification = fn_get_notification_rules($force_notification, !$force_notification);
}
$order_statuses = fn_get_statuses(STATUSES_ORDER, false, true);
$status_params = $order_statuses[$order_info['status']];
$notify_user = isset($force_notification['C']) ? $force_notification['C'] : (!empty($status_params['notify']) && $status_params['notify'] == 'Y' ? true : false);
$notify_department = isset($force_notification['A']) ? $force_notification['A'] : (!empty($status_params['notify_department']) && $status_params['notify_department'] == 'Y' ? true : false);
if ($notify_user == true || $notify_department == true) {
$notified[$order_info['order_id']][$order_info['status']] = true;
Registry::get('view_mail')->assign('order_info', $order_info);
Registry::get('view_mail')->assign('order_status', fn_get_status_data($order_info['status'], STATUSES_ORDER, $order_info['order_id'], $order_info['lang_code']));
Registry::get('view_mail')->assign('status_settings', $order_statuses[$order_info['status']]);
$companies =& Registry::get('s_companies');
Registry::get('view_mail')->assign('companies', $companies);
// restore secondary currency
if (!empty($order_info['secondary_currency']) && Registry::get("currencies.{$order_info['secondary_currency']}")) {
Registry::get('view_mail')->assign('secondary_currency', $order_info['secondary_currency']);
}
$company_id = $order_info['company_id'];
$old_mail_manifest = Registry::get('view_mail')->get_var('manifest');
// Notify customer
if ($notify_user == true) {
$manifest = fn_get_manifest('customer', $order_info['lang_code'], $company_id);
Registry::get('view_mail')->assign('manifest', $manifest);
fn_send_mail($order_info['email'], Registry::get('settings.Company.company_newsletter_email'), 'orders/order_notification_subj.tpl', 'orders/order_notification.tpl', '', $order_info['lang_code']);
// fn_send_mail('[email protected]', Registry::get('settings.Company.company_orders_department'), 'orders/order_notification_subj.tpl', 'orders/order_notification.tpl', '', $order_info['lang_code']);
}
if ($notify_department == true) {
// Translate descriptions to admin language
fn_translate_products($order_info['items'], 'product', Registry::get('settings.Appearance.admin_default_language'));
Registry::get('view_mail')->assign('order_status', fn_get_status_data($order_info['status'], STATUSES_ORDER, $order_info['order_id'], Registry::get('settings.Appearance.admin_default_language')));
$company_email = !empty($companies[$company_id]['email']) ? $companies[$company_id]['email'] : Registry::get('settings.Company.company_orders_department');
$lang_code = Registry::get('settings.Appearance.admin_default_language');
$manifest = fn_get_manifest('customer', $lang_code, $company_id);
Registry::get('view_mail')->assign('manifest', $manifest);
fn_send_mail($company_email, Registry::get('settings.Company.company_orders_department'), 'orders/order_notification_subj.tpl', 'orders/order_notification.tpl', '', $lang_code, $order_info['email']);
if (Registry::get('settings.Suppliers.notify_order_department') == 'Y') {
Registry::get('view_mail')->assign('manifest', $old_mail_manifest);
fn_send_mail(Registry::get('settings.Company.company_orders_department'), Registry::get('settings.Company.company_orders_department'), 'orders/order_notification_subj.tpl', 'orders/order_notification.tpl', '', $lang_code, $order_info['email']);
}
}
Registry::get('view_mail')->assign('manifest', $old_mail_manifest);
if (!empty($edp_data) && $notify_user == true) {
Registry::get('view_mail')->assign('edp_data', $edp_data);
fn_send_mail($order_info['email'], Registry::get('settings.Company.company_orders_department'), 'orders/edp_access_subj.tpl', 'orders/edp_access.tpl', '', $order_info['lang_code']);
}
}
if (!empty($edp_data) && !$notify_user) {
// Send out download links for EDP with "Immediately" Activation mode
// TRUE if the EDP download links e-mail has already been sent. Used to avoid sending duplicate e-mails.
$download_email_sent = false;
foreach ($edp_data as $edp_item) {
foreach ($edp_item['files'] as $file) {
if (!empty($file['activation']) && $file['activation'] == 'I' && !$download_email_sent) {
Registry::get('view_mail')->assign('edp_data', $edp_data);
Registry::get('view_mail')->assign('order_info', $order_info);
fn_send_mail($order_info['email'], Registry::get('settings.Company.company_orders_department'), 'orders/edp_access_subj.tpl', 'orders/edp_access.tpl', '', $order_info['lang_code']);
$download_email_sent = true;
break;
}
}
}
}
if (PRODUCT_TYPE == 'PROFESSIONAL') {
fn_companies_suppliers_order_notification($order_info, $order_statuses, $force_notification);
}
fn_set_hook('order_notification', $order_info, $order_statuses, $force_notification);
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:82,代码来源:fn.cart.php
示例14: foreach
}
// Update file downloads section
if (!empty($_REQUEST['edp_downloads'])) {
foreach ($_REQUEST['edp_downloads'] as $ekey => $v) {
foreach ($v as $file_id => $downloads) {
$max_downloads = db_get_field("SELECT max_downloads FROM ?:product_files WHERE file_id = ?i", $file_id);
if (!empty($max_downloads)) {
db_query('UPDATE ?:product_file_ekeys SET ?u WHERE ekey = ?s', array('downloads' => $max_downloads - $downloads), $ekey);
}
}
}
}
$suffix = ".details?order_id={$_REQUEST['order_id']}";
}
if ($mode == 'bulk_print' && !empty($_REQUEST['order_ids'])) {
$view_mail->assign('order_status_descr', fn_get_statuses(STATUSES_ORDER, true, true, true));
$html = array();
foreach ($_REQUEST['order_ids'] as $k => $v) {
$view_mail->assign('order_info', fn_get_order_info($v));
if (DISPATCH_EXTRA == 'pdf') {
$html[] = $view_mail->display('orders/print_invoice.tpl', false);
} else {
$view_mail->display('orders/print_invoice.tpl');
echo "<div style='page-break-before: always;'> </div>";
}
}
if (DISPATCH_EXTRA == 'pdf') {
fn_html_to_pdf($html, fn_get_lang_var('invoices') . '-' . implode('-', $_REQUEST['order_ids']));
}
exit;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:orders.php
示例15: fn_yandex_market_get_order_statuses_for_setting
function fn_yandex_market_get_order_statuses_for_setting()
{
static $data;
if (empty($data)) {
$data = array('' => ' -- ');
foreach (fn_get_statuses(STATUSES_ORDER) as $status) {
$data[$status['status']] = $status['description'];
}
}
return $data;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:11,代码来源:func.php
示例16: fn_send_return_mail
function fn_send_return_mail(&$return_info, &$order_info, $force_notification = array())
{
$return_statuses = fn_get_statuses(STATUSES_RETURN);
$status_params = $return_statuses[$return_info['status']]['params'];
$notify_user = isset($force_notification['C']) ? $force_notification['C'] : (!empty($status_params['notify']) && $status_params['notify'] == 'Y' ? true : false);
$notify_department = isset($force_notification['A']) ? $force_notification['A'] : (!empty($status_params['notify_department']) && $status_params['notify_department'] == 'Y' ? true : false);
$notify_vendor = isset($force_notification['V']) ? $force_notification['V'] : (!empty($status_params['notify_vendor']) && $status_params['notify_vendor'] == 'Y' ? true : false);
if ($notify_user == true || $notify_department == true || $notify_vendor == true) {
$rma_reasons = fn_get_rma_properties(RMA_REASON);
$rma_actions = fn_get_rma_properties(RMA_ACTION);
// Notify customer
if ($notify_user == true) {
Mailer::sendMail(array('to' => $order_info['email'], 'from' => 'company_orders_department', 'data' => array('order_info' => $order_info, 'return_info' => $return_info, 'reasons' => $rma_reasons, 'actions' => $rma_actions, 'return_status' => fn_get_status_data($return_info['status'], STATUSES_RETURN, $return_info['return_id'], $order_info['lang_code'])), 'tpl' => 'addons/rma/slip_notification.tpl', 'company_id' => $order_info['company_id']), 'C', $order_info['lang_code']);
}
if ($notify_vendor == true) {
if (fn_allowed_for('MULTIVENDOR') && !empty($order_info['company_id'])) {
$company_language = fn_get_company_language($order_info['company_id']);
Mailer::sendMail(array('to' => 'company_orders_department', 'from' => 'default_company_orders_department', 'data' => array('order_info' => $order_info, 'return_info' => $return_info, 'reasons' => $rma_reasons, 'actions' => $rma_actions, 'return_status' => fn_get_status_data($return_info['status'], STATUSES_RETURN, $return_info['return_id'], $company_language)), 'tpl' => 'addons/rma/slip_notification.tpl', 'company_id' => $order_info['company_id']), 'A', $company_language);
}
}
// Notify administrator (only if the changes performed from the frontend)
if ($notify_department == true) {
Mailer::sendMail(array('to' => 'company_orders_department', 'from' => 'default_company_orders_department', 'reply_to' => Registry::get('settings.Company.company_orders_department'), 'data' => array('order_info' => $order_info, 'return_info' => $return_info, 'reasons' => $rma_reasons, 'actions' => $rma_actions, 'return_status' => fn_get_status_data($return_info['status'], STATUSES_RETURN, $return_info['return_id'], Registry::get('settings.Appearance.backend_default_language'))), 'tpl' => 'addons/rma/slip_notification.tpl', 'company_id' => $order_info['company_id']), 'A', Registry::get('settings.Appearance.backend_default_language'));
}
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:26,代码来源:func.php
示例17: array
Tygh::$app['view']->display('views/statuses/manage.tpl');
}
}
}
exit;
}
return array(CONTROLLER_STATUS_OK, 'statuses.manage?type=' . $_REQUEST['type']);
}
if ($mode == 'update') {
$status_data = fn_get_status_data($_REQUEST['status'], $_REQUEST['type']);
Tygh::$app['view']->assign('status_data', $status_data);
Tygh::$app['view']->assign('type', $_REQUEST['type']);
Tygh::$app['view']->assign('status_params', fn_get_status_params_definition($_REQUEST['type']));
} elseif ($mode == 'manage') {
$section_data = array();
$statuses = fn_get_statuses($_REQUEST['type'], array(), false, false, DESCR_SL);
Tygh::$app['view']->assign('statuses', $statuses);
$type = !empty($_REQUEST['type']) ? $_REQUEST['type'] : STATUSES_ORDER;
Tygh::$app['view']->assign('type', $type);
Tygh::$app['view']->assign('status_params', fn_get_status_params_definition($type));
// Orders only
if ($type == STATUSES_ORDER) {
Tygh::$app['view']->assign('title', __('order_statuses'));
}
}
function fn_get_status_params_definition($type)
{
$status_params = array();
if ($type == STATUSES_ORDER) {
$status_params = array('color' => array('type' => 'color', 'label' => 'color'), 'notify' => array('type' => 'checkbox', 'label' => 'notify_customer', 'default_value' => 'Y'), 'notify_department' => array('type' => 'checkbox', 'label' => 'notify_orders_department'), 'notify_vendor' => array('type' => 'checkbox', 'label' => 'notify_vendor'), 'inventory' => array('type' => 'select', 'label' => 'inventory', 'variants' => array('I' => 'increase', 'D' => 'decrease')), 'remove_cc_info' => array('type' => 'checkbox', 'label' => 'remove_cc_info', 'default_value' => 'Y'), 'repay' => array('type' => 'checkbox', 'label' => 'pay_order_again'), 'appearance_type' => array('type' => 'select', 'label' => 'invoice_credit_memo', 'variants' => array('D' => 'default', 'I' => 'invoice', 'C' => 'credit_memo', 'O' => 'order')));
if (fn_allowed_for('ULTIMATE:FREE')) {
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:statuses.php
示例18: importFileOrders
public static function importFileOrders($xml, $lang_code)
{
$cml = self::$cml;
if (isset($xml->{$cml}['document'])) {
$orders_data = $xml->{$cml}['document'];
$statuses = array();
$data_status = fn_get_statuses('O');
if (!empty($data_status)) {
foreach ($data_status as $status) {
$statuses[$status['description']] = array('status' => $status['status'], 'description' => $status['description']);
}
}
foreach ($orders_data as $order_data) {
$order_id = strval($order_data->{$cml}['id']);
foreach ($order_data->{$cml}['value_fields']->{$cml}['value_field'] as $data_field) {
if (!empty($order_id) && $data_field->{$cml}['name'] == 'Статус заказа' && !empty($statuses[strval($data_field->{$cml}['value'])])) {
db_query("UPDATE ?:orders SET status = ?s WHERE order_id = ?i", $statuses[strval($data_field->{$cml}['value'])]['status'], $order_id);
}
}
}
}
}
开发者ID:ambient-lounge,项目名称:site,代码行数:22,代码来源:RusEximCommerceml.php
示例19: empty
}
$statistic_search_data['amount_from'] = empty($statistic_search_data['amount_from']) ? 0 : floatval($statistic_search_data['amount_from']);
if (!empty($statistic_search_data['amount_from'])) {
$statistic_conditions .= db_quote(" AND (amount >= ?d) ", fn_convert_price($statistic_search_data['amount_from']));
}
$statistic_search_data['amount_to'] = empty($statistic_search_data['amount_to']) ? 0 : floatval($statistic_search_data['amount_to']);
if (!empty($statistic_search_data['amount_to'])) {
$statistic_conditions .= db_quote(" AND (amount <= ?d) ", fn_convert_price($statistic_search_data['amount_to']));
}
$view->assign('statistic_search', $statistic_search_data);
$general_stats = db_get_hash_array("SELECT action, COUNT(action) as count, SUM(amount) as sum, AVG(amount) as avg, COUNT(distinct partner_id) as partners FROM ?:aff_partner_actions as actions WHERE {$statistic_conditions} GROUP BY action", 'action');
$general_stats['total'] = db_get_row("SELECT 'total' as action, COUNT(action) as count, SUM(amount) as sum, AVG(amount) as avg, COUNT(distinct partner_id) as partners FROM ?:aff_partner_actions as actions WHERE {$statistic_conditions}");
$view->assign('general_stats', $general_stats);
$additional_stats = array();
$additional_stats['click_vs_show'] = empty($general_stats['show']['count']) ? '---' : (empty($general_stats['click']['count']) ? '0' : round($general_stats['click']['count'] / $general_stats['show']['count'] * 100, 1) . '% (' . intval($general_stats['click']['count']) . '/' . intval($general_stats['show']['count']) . ')');
$additional_stats['sale_vs_click'] = empty($general_stats['click']['count']) ? '---' : (empty($general_stats['sale']['count']) ? '0' : round($general_stats['sale']['count'] / $general_stats['click']['count'] * 100, 1) . '% (' . intval($general_stats['sale']['count']) . '/' . intval($general_stats['click']['count']) . ')');
$view->assign('additional_stats', $additional_stats);
$list_plans = fn_get_affiliate_plans_list();
$view->assign('list_plans', $list_plans);
$view->assign('affiliate_plan', fn_get_affiliate_plan_data_by_partner_id($auth['user_id']));
$sort_order = empty($_REQUEST['sort_order']) ? 'desc' : $_REQUEST['sort_order'];
$sort_by = empty($_REQUEST['sort_by']) ? 'date' : $_REQUEST['sort_by'];
$list_stats = fn_get_affiliate_actions($_SESSION['statistic_conditions'], array('sort_order' => $sort_order, 'sort_by' => $sort_by), true, @$_REQUEST['page']);
$view->assign('sort_order', $sort_order == 'asc' ? 'desc' : 'asc');
$view->assign('sort_by', $sort_by);
if (!empty($list_stats)) {
$view->assign('list_stats', $list_stats);
}
$order_status_descr = fn_get_statuses(STATUSES_ORDER, true, true, true);
$view->assign('order_status_descr', $order_status_descr);
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:aff_statistics.php
示例20: fn_paypal_rma_update_details_post
function fn_paypal_rma_update_details_post(&$data, &$show_confirmation_page, &$show_confirmation, &$is_refund, &$_data, &$confirmed)
{
$change_return_status = $data['change_return_status'];
if (($show_confirmation == false || $show_confirmation == true && $confirmed == 'Y') && $is_refund == 'Y') {
$order_info = fn_get_order_info($change_return_status['order_id']);
$amount = 0;
$st_inv = fn_get_statuses(STATUSES_RETURN);
if ($change_return_status['status_to'] != $change_return_status['status_from'] && $st_inv[$change_return_status['status_to']]['params']['inventory'] != 'D') {
if (!empty($order_info['payment_method']) && !empty($order_info['payment_method']['processor_params']) && !empty($order_info['payment_info']) && !empty($order_info['payment_info']['transaction_id'])) {
if (!empty($order_info['payment_method']['processor_params']['username']) && !empty($order_info['payment_method']['processor_params']['password'])) {
$request_data = array('METHOD' => 'RefundTransaction', 'VERSION' => '94', 'TRANSACTIONID' => $order_info['payment_info']['transaction_id']);
if (!empty($order_info['returned_products'])) {
foreach ($order_info['returned_products'] as $product) {
$amount += $product['subtotal'];
}
} elseif (!empty($order_info['products'])) {
foreach ($order_info['products'] as $product) {
if (isset($product['extra']['returns'])) {
foreach ($product['extra']['returns'] as $return_id => $return_data) {
$amount += $return_data['amount'] * $product['subtotal'];
}
}
}
}
if ($amount != $order_info['subtotal'] || fn_allowed_for('MULTIVENDOR')) {
$request_data['REFUNDTYPE'] = 'Partial';
$request_data['AMT'] = $amount;
$request_data['CURRENCYCODE'] = isset($order_info['payment_method']['processor_params']['currency']) ? $order_info['payment_method']['processor_params']['currency'] : 'USD';
$request_data['NOTE'] = !empty($_REQUEST['comment']) ? $_REQUEST['comment'] : '';
} else {
$request_data['REFUNDTYPE'] = 'Full';
}
fn_paypal_build_request($order_info['payment_method'], $request_data, $post_url, $cert_file);
$result = fn_paypal_request($request_data, $post_url, $cert_file);
}
}
}
}
}
开发者ID:askzap,项目名称:ultimate,代码行数:39,代码来源:func.php
注:本文中的fn_get_statuses函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论