}
}
$order_total = $order->getTotalData($order->info['order_id']);
$smarty->assign('order_data', $order->getOrderData($order->info['order_id']));
$smarty->assign('order_total', $order_total['data']);
// Payment Method
if ($order->info['payment_method'] != '' && $order->info['payment_method'] != 'no_payment') {
    include DIR_WS_LANGUAGES . '/' . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_method'] . '.php';
    $smarty->assign('PAYMENT_METHOD', constant('MODULE_PAYMENT_' . strtoupper($order->info['payment_method']) . '_TEXT_TITLE'));
}
## PayPal
if ($order->info['payment_method'] == 'paypallink' || $order->info['payment_method'] == 'paypalpluslink') {
    require_once DIR_FS_EXTERNAL . 'paypal/classes/PayPalPayment.php';
    $paypal = new PayPalPayment($order->info['payment_method']);
    if ($paypal->get_config('MODULE_PAYMENT_' . strtoupper($order->info['payment_method']) . '_USE_ACCOUNT') == 1) {
        $button = $paypal->create_paypal_link($order->info['order_id']);
        if ($button != '') {
            $smarty->assign('PAYPAL_LINK', sprintf(constant('MODULE_PAYMENT_' . strtoupper($order->info['payment_method']) . '_TEXT_SUCCESS'), $button));
        }
        if ($messageStack->size($order->info['payment_method']) > 0) {
            $smarty->assign('info_message', $messageStack->output($order->info['payment_method']));
        }
    }
}
// Order History
$history_block = '';
//DokuMan - 2010-09-18 - set undefined variable
$statuses_query = xtc_db_query("-- /account_history_info.php\n                                SELECT os.orders_status_name,\n                                       osh.date_added,\n                                       osh.comments,\n                                       osh.comments_sent\n                                FROM " . TABLE_ORDERS_STATUS . " os,\n                                     " . TABLE_ORDERS_STATUS_HISTORY . " osh\n                                WHERE osh.orders_id = '" . $order->info['order_id'] . "'\n                                  AND osh.customer_notified = 1\n                                  AND osh.orders_status_id = os.orders_status_id\n                                  AND os.language_id = '" . (int) $_SESSION['languages_id'] . "'\n                                ORDER BY osh.date_added");
while ($statuses = xtc_db_fetch_array($statuses_query)) {
    $history_block .= xtc_date_short($statuses['date_added']) . '&nbsp;<strong>' . $statuses['orders_status_name'] . '</strong>&nbsp;' . (empty($statuses['comments']) || empty($statuses['comments_sent']) ? '&nbsp;' : nl2br(encode_htmlspecialchars($statuses['comments']))) . '<br />';
}
Пример #2
0
   $Id$

   modified eCommerce Shopsoftware
   http://www.modified-shop.org

   Copyright (c) 2009 - 2013 [www.modified-shop.org]
   -----------------------------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
$paypal_payment_method = array('paypalplus', 'paypalclassic', 'paypalcart', 'paypallink', 'paypalpluslink');
if (is_object($order) && in_array($order->info['payment_method'], $paypal_payment_method)) {
    // include needed classes
    require_once DIR_FS_EXTERNAL . 'paypal/classes/PayPalPayment.php';
    $paypal = new PayPalPayment($order->info['payment_method']);
    if (strpos($order->info['payment_method'], 'link') !== false) {
        $paypal_payment_info = array(array('title' => $paypal->title . ': ', 'class' => $paypal->code, 'fields' => array(array('title' => '', 'field' => sprintf(constant('MODULE_PAYMENT_' . strtoupper($paypal->code) . '_TEXT_SUCCESS'), $paypal->create_paypal_link($order->info['order_id']))))));
        $paypal_smarty = new Smarty();
        if (defined('RUN_MODE_ADMIN')) {
            $paypal_smarty->template_dir = DIR_FS_CATALOG . 'templates';
            $paypal_smarty->compile_dir = DIR_FS_CATALOG . 'templates_c';
            $paypal_smarty->config_dir = DIR_FS_CATALOG . 'lang';
        }
        $paypal_smarty->caching = 0;
        $paypal_smarty->assign('PAYMENT_INFO', $paypal_payment_info);
        $paypal_smarty->assign('language', $_SESSION['language']);
        $payment_info_content = $paypal_smarty->fetch(DIR_FS_EXTERNAL . 'paypal/templates/payment_info.html');
        $smarty->assign('PAYMENT_INFO_HTML', $payment_info_content);
        $smarty->assign('PAYMENT_INFO_TXT', sprintf(constant('MODULE_PAYMENT_' . strtoupper($paypal->code) . '_TEXT_SUCCESS'), $paypal->create_paypal_link($order->info['order_id'], true)));
    } else {
        $paypal_payment_info = $paypal->get_payment_instructions($order->info['order_id']);
        if (is_array($paypal_payment_info)) {