コード例 #1
0
ファイル: orders.php プロジェクト: heg-arc-ne/cscart
        Registry::set('navigation.tabs.promotions', array('title' => __('promotions'), 'js' => true));
    }
    list($shipments) = fn_get_shipments_info(array('order_id' => $params['order_id'], 'advanced_info' => true));
    $use_shipments = !fn_one_full_shipped($shipments);
    // Check for the shipment access
    // If current edition is FREE, we still need to check shipments accessibility (need to display promotion link)
    if (Settings::instance()->getValue('use_shipments', '', $order_info['company_id']) == 'Y') {
        if (!fn_check_user_access($auth['user_id'], 'edit_order')) {
            $order_info['need_shipment'] = false;
        }
        $use_shipments = true;
    } else {
        Registry::get('view')->assign('shipments', $shipments);
    }
    Registry::get('view')->assign('use_shipments', $use_shipments);
    Registry::get('view')->assign('carriers', fn_get_carriers());
    Registry::get('view')->assign('order_info', $order_info);
    Registry::get('view')->assign('status_settings', fn_get_status_params($order_info['status']));
    // Delete order_id from new_orders table
    db_query("DELETE FROM ?:new_orders WHERE order_id = ?i AND user_id = ?i", $_REQUEST['order_id'], $auth['user_id']);
    // Check if customer's email is changed
    if (!empty($order_info['user_id'])) {
        $current_email = db_get_field("SELECT email FROM ?:users WHERE user_id = ?i", $order_info['user_id']);
        if (!empty($current_email) && $current_email != $order_info['email']) {
            Registry::get('view')->assign('email_changed', true);
        }
    }
} elseif ($mode == 'picker') {
    $_REQUEST['skip_view'] = 'Y';
    list($orders, $search) = fn_get_orders($_REQUEST, Registry::get('settings.Appearance.admin_orders_per_page'));
    Registry::get('view')->assign('orders', $orders);
コード例 #2
0
ファイル: orders.php プロジェクト: askzap/ultimate
        Registry::set('navigation.tabs.promotions', array('title' => __('promotions'), 'js' => true));
    }
    list($shipments) = fn_get_shipments_info(array('order_id' => $params['order_id'], 'advanced_info' => true));
    $use_shipments = !fn_one_full_shipped($shipments);
    // Check for the shipment access
    // If current edition is FREE, we still need to check shipments accessibility (need to display promotion link)
    if (Settings::instance()->getValue('use_shipments', '', $order_info['company_id']) == 'Y') {
        if (!fn_check_user_access($auth['user_id'], 'edit_order')) {
            $order_info['need_shipment'] = false;
        }
        $use_shipments = true;
    } else {
        Tygh::$app['view']->assign('shipments', $shipments);
    }
    Tygh::$app['view']->assign('use_shipments', $use_shipments);
    Tygh::$app['view']->assign('carriers', fn_get_carriers());
    Tygh::$app['view']->assign('order_info', $order_info);
    Tygh::$app['view']->assign('status_settings', fn_get_status_params($order_info['status']));
    // Delete order_id from new_orders table
    db_query("DELETE FROM ?:new_orders WHERE order_id = ?i AND user_id = ?i", $_REQUEST['order_id'], $auth['user_id']);
    // Check if customer's email is changed
    if (!empty($order_info['user_id'])) {
        $current_email = db_get_field("SELECT email FROM ?:users WHERE user_id = ?i", $order_info['user_id']);
        if (!empty($current_email) && $current_email != $order_info['email']) {
            Tygh::$app['view']->assign('email_changed', true);
        }
    }
} elseif ($mode == 'picker') {
    $_REQUEST['skip_view'] = 'Y';
    list($orders, $search) = fn_get_orders($_REQUEST, Registry::get('settings.Appearance.admin_orders_per_page'));
    Tygh::$app['view']->assign('orders', $orders);