当前位置: 首页>>代码示例>>PHP>>正文


PHP order_total类代码示例

本文整理汇总了PHP中order_total的典型用法代码示例。如果您正苦于以下问题:PHP order_total类的具体用法?PHP order_total怎么用?PHP order_total使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了order_total类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update_status

 function update_status()
 {
     global $order;
     if ($this->enabled === true && (!defined('MODULE_ORDER_TOTAL_PAYPALINSTALLMENT_FEE_STATUS') || MODULE_ORDER_TOTAL_PAYPALINSTALLMENT_FEE_STATUS == 'false')) {
         $this->enabled = false;
     }
     if ($this->enabled === true && $order->billing['country']['iso_code_2'] != 'DE') {
         $this->enabled = false;
     }
     if ($this->enabled === true && ($_SESSION['customers_status']['customers_status_show_price_tax'] != '1' || $_SESSION['customers_status']['customers_status_add_tax_ot'] != '0')) {
         $this->enabled = false;
     }
     if ($this->enabled === true) {
         if (!class_exists('order_total')) {
             require_once DIR_WS_CLASSES . 'order_total.php';
         }
         $order_total_modules = new order_total();
         $order_totals = $order_total_modules->process();
         $this->total_amount = 0;
         for ($i = 0, $n = count($order_totals); $i < $n; $i++) {
             if ($order_totals[$i]['code'] == 'ot_total') {
                 $this->total_amount = $order_totals[$i]['value'];
             }
         }
         $this->presentment_array = $this->get_presentment($this->total_amount, $order->info['currency'], $order->billing['country']['iso_code_2']);
         if (count($this->presentment_array) < 1) {
             $this->enabled = false;
         }
     }
 }
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:30,代码来源:paypalinstallment.php

示例2: hasPaymentDue

 function hasPaymentDue()
 {
     require_once DIR_FS_CLASSES . 'order_total.php';
     $otModules = new order_total();
     global $gCommerceSystem;
     $ret = TRUE;
     if (($ret = $this->getField('total') > 0) && $gCommerceSystem->getConfig('MODULE_ORDER_TOTAL_INSTALLED')) {
         $totalDeductions = 0;
         $totalDue = $this->getField('total');
         foreach ($otModules->modules as $modName) {
             $modClass = substr($modName, 0, strrpos($modName, '.'));
             $totalDue = $otModules->get_order_total_main($modClass, $totalDue);
             if (!empty($GLOBALS[$modClass]->credit_class)) {
                 $totalDeductions += $GLOBALS[$modClass]->pre_confirmation_check($totalDue);
                 $totalDue -= $GLOBALS[$modClass]->pre_confirmation_check($totalDue);
             }
         }
         if ($this->getField('total') - $totalDeductions <= 0.008999999999999999) {
             $ret = FALSE;
         }
     }
     return $ret;
 }
开发者ID:bitweaver,项目名称:commerce,代码行数:23,代码来源:CommerceOrder.php

示例3: reset_checkout_cart_session

 function reset_checkout_cart_session()
 {
     global $cart;
     $cart->reset(true);
     olc_session_unregister('sendto');
     olc_session_unregister('billto');
     olc_session_unregister('shipping');
     olc_session_unregister('payment');
     olc_session_unregister('comments');
     olc_session_unregister('PayPal_osC');
     if (!class_exists('order_total')) {
         include_once DIR_WS_CLASSES . 'order_total.php';
     }
     if (is_callable(array('order_total', 'clear_posts'))) {
         //Looks like CCGV installed
         global $order_total_modules;
         if (!is_object($order_total_modules)) {
             $order_total_modules = new order_total();
         }
         $order_total_modules->clear_posts();
         //ICW ADDED FOR CREDIT CLASS SYSTEM
     }
 }
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:23,代码来源:osC.class.php

示例4: getZenTotals

 /**
  * Get zen-cart order totals.
  *
  * @param  ShoppingCart $shoppingCart The current shopping cart.
  * @return array        zencart order totals.
  */
 protected function getZenTotals(ShoppingCart $shoppingCart)
 {
     global $order, $shipping_modules;
     // save
     $otmp = $order;
     $smtmp = $shipping_modules;
     $order = new \order();
     if (!isset($shipping_modules)) {
         $ssm = array();
         if (null != ($shippingMethod = $shoppingCart->getSelectedShippingMethod())) {
             $ssm = array('id' => $shippingMethod->getShippingId(), 'title' => $shippingMethod->getName(), 'cost' => $shippingMethod->getCost());
         }
         $shipping_modules = new \shipping($ssm);
     }
     $zenTotals = new \order_total();
     $zenTotals->collect_posts();
     $zenTotals->pre_confirmation_check();
     $zenTotals->process();
     // restore
     $order = $otmp;
     $shipping_modules = $smtmp;
     return $zenTotals;
 }
开发者ID:zenmagick,项目名称:zenmagick,代码行数:29,代码来源:ZMOrderTotals.php

示例5: paypal_express_auth_call

 function paypal_express_auth_call()
 {
     // aufruf aus cart_actions.php
     // 1. Call um die Token ID zu bekommen
     // Steuer, Artikel usw bei eingeloggt
     // Stand: 03.05.2012
     global $xtPrice, $order;
     // Session säubern
     unset($_SESSION['reshash']);
     unset($_SESSION['nvpReqArray']);
     // Shipping:
     if (!isset($_SESSION['sendto'])) {
         $_SESSION['sendto'] = $_SESSION['customer_default_address_id'];
     } else {
         // verify the selected shipping address
         $check_address_query = xtc_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $_SESSION['customer_id'] . "' and address_book_id = '" . (int) $_SESSION['sendto'] . "'");
         $check_address = xtc_db_fetch_array($check_address_query);
         if ($check_address['total'] != '1') {
             $_SESSION['sendto'] = $_SESSION['customer_default_address_id'];
         }
     }
     // Shipping beim 1. Call auf jeden Fall löschen falls Änderungen im WK
     if (isset($_SESSION['shipping'])) {
         unset($_SESSION['shipping']);
     }
     // Shipping END
     require DIR_WS_CLASSES . 'order.php';
     $order = new order();
     require DIR_WS_CLASSES . 'order_total.php';
     $order_total_modules = new order_total();
     $order_totals = $order_total_modules->process();
     $order_tax = 0;
     $order_discount = 0;
     $order_gs = 0;
     $order_fee = 0;
     $order_shipping = 0;
     for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
         switch ($order_totals[$i]['code']) {
             case 'ot_discount':
                 $order_discount += $order_totals[$i]['value'];
                 break;
             case 'ot_coupon':
             case 'ot_coupon':
                 $order_gs += $order_totals[$i]['value'] < 0 ? $order_totals[$i]['value'] : $order_totals[$i]['value'] * -1;
                 break;
             case 'ot_gv':
                 $order_gs += $order_totals[$i]['value'] < 0 ? $order_totals[$i]['value'] : $order_totals[$i]['value'] * -1;
                 break;
                 ///  customers bonus
             ///  customers bonus
             case 'ot_bonus_fee':
                 $order_gs += $order_totals[$i]['value'] < 0 ? $order_totals[$i]['value'] : $order_totals[$i]['value'] * -1;
                 break;
             case 'ot_payment':
                 if ($order_totals[$i]['value'] < 0) {
                     // Rabatt aus Fremd Modul
                     $order_discount += $order_totals[$i]['value'];
                 } else {
                     $order_fee += $order_totals[$i]['value'];
                 }
                 break;
             case 'ot_cod_fee':
                 $order_fee += $order_totals[$i]['value'];
                 break;
             case 'ot_ps_fee':
                 $order_fee += $order_totals[$i]['value'];
                 break;
             case 'ot_loworderfee':
                 $order_fee += $order_totals[$i]['value'];
         }
     }
     // AMT
     $paymentAmount = $_SESSION['cart']->show_total() + $order_discount + $order_gs + $order_fee;
     // Durch Kupon oder irgendwas auf unter 0 -> Kein PP Express sinnvoll
     if ($paymentAmount <= 0) {
         $_SESSION['reshash']['FORMATED_ERRORS'] = PAYPAL_AMMOUNT_NULL;
         $this->payPalURL = $this->EXPRESS_CANCEL_URL;
         return $this->payPalURL;
     }
     if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
         $order_tax = $_SESSION['cart']->show_tax(false);
     }
     // Vorläufige Versandkosten
     if (PAYPAL_EXP_VORL != '' && PAYPAL_EXP_VERS != 0) {
         $paymentAmount += PAYPAL_EXP_VERS;
     }
     // AMT
     $paymentAmount = round($paymentAmount, $xtPrice->get_decimal_places($order->info['currency']));
     // Summen der Order
     $order_tax = round($order_tax, $xtPrice->get_decimal_places($order->info['currency']));
     $order_discount = round($order_discount, $xtPrice->get_decimal_places($order->info['currency']));
     $order_gs = round($order_gs, $xtPrice->get_decimal_places($order->info['currency']));
     $order_fee = round($order_fee, $xtPrice->get_decimal_places($order->info['currency']));
     $nvp_products = $this->paypal_get_products($paymentAmount, $order_tax, $order_discount, $order_fee, $order_shipping, $order_gs, True);
     $paymentAmount = urlencode(number_format($paymentAmount, $xtPrice->get_decimal_places($order->info['currency']), '.', ','));
     $currencyCodeType = urlencode($order->info['currency']);
     // Payment Type
     $paymentType = 'Sale';
     $returnURL = urlencode($this->EXPRESS_RETURN_URL);
     $cancelURL = urlencode($this->EXPRESS_CANCEL_URL);
//.........这里部分代码省略.........
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:101,代码来源:paypal_checkout.php

示例6: process_new_order_notification


//.........这里部分代码省略.........
    $order->delivery['suburb'] = $gc_data[$root]['buyer-shipping-address']['address2']['VALUE'];
    $order->delivery['city'] = $gc_data[$root]['buyer-shipping-address']['city']['VALUE'];
    $order->delivery['postcode'] = $gc_data[$root]['buyer-shipping-address']['postal-code']['VALUE'];
    $order->delivery['state'] = $gc_data[$root]['buyer-shipping-address']['region']['VALUE'];
    $order->delivery['country']['title'] = $gc_data[$root]['buyer-shipping-address']['country-code']['VALUE'];
    $order->delivery['format_id'] = 2;
    list($order->billing['firstname'], $order->billing['lastname']) = explode(' ', $gc_data[$root]['buyer-billing-address']['contact-name']['VALUE'], 2);
    $order->billing['company'] = $gc_data[$root]['buyer-billing-address']['company-name']['VALUE'];
    $order->billing['street_address'] = $gc_data[$root]['buyer-billing-address']['address1']['VALUE'];
    $order->billing['suburb'] = $gc_data[$root]['buyer-billing-address']['address2']['VALUE'];
    $order->billing['city'] = $gc_data[$root]['buyer-billing-address']['city']['VALUE'];
    $order->billing['postcode'] = $gc_data[$root]['buyer-billing-address']['postal-code']['VALUE'];
    $order->billing['state'] = $gc_data[$root]['buyer-billing-address']['region']['VALUE'];
    $order->billing['country']['title'] = $gc_data[$root]['buyer-billing-address']['country-code']['VALUE'];
    $order->billing['format_id'] = 2;
    $order->info['payment_method'] = $payment_method;
    $order->info['payment_module_code'] = $google_checkout->code;
    $order->info['shipping_method'] = $shipping_method_name;
    $order->info['shipping_module_code'] = $shipping_method_code;
    $order->info['cc_type'] = '';
    $order->info['cc_owner'] = '';
    $order->info['cc_number'] = '';
    $order->info['cc_expires'] = '';
    $order->info['order_status'] = GC_STATE_NEW;
    $order->info['tax'] = $tax_amt;
    $order->info['currency'] = $gc_data[$root]['order-total']['currency'];
    $order->info['currency_value'] = 1;
    //$customers_ip_address'] = $gc_data[$root]['shopping-cart']['merchant-private-data']['ip-address']['VALUE'];
    $order->info['comments'] = GOOGLECHECKOUT_STATE_NEW_ORDER_NUM . $gc_data[$root]['google-order-number']['VALUE'] . "\n" . GOOGLECHECKOUT_STATE_NEW_ORDER_MC_USED . (@$gc_data[$root]['order-adjustment']['merchant-calculation-successful']['VALUE'] == 'true' ? 'True' : 'False') . ($new_user ? "\n" . GOOGLECHECKOUT_STATE_NEW_ORDER_BUYER_USER . $gc_data[$root]['buyer-billing-address']['email']['VALUE'] . "\n" . GOOGLECHECKOUT_STATE_NEW_ORDER_BUYER_PASS . $gc_data[$root]['buyer-id']['VALUE'] : '');
    $coupons = gc_get_arr_result(@$gc_data[$root]['order-adjustment']['merchant-codes']['coupon-adjustment']);
    //$gift_cert = get_arr_result(@$gc_data[$root]['order-adjustment']['merchant-codes']['gift-certificate-adjustment']);
    $items = gc_get_arr_result($gc_data[$root]['shopping-cart']['items']['item']);
    // Get Coustoms OT
    $custom_order_totals_total = 0;
    $custom_order_totals = array();
    $order->products = array();
    foreach ($items as $item) {
        if (isset($item['merchant-private-item-data']['item']['VALUE'])) {
            $order->products[] = unserialize(base64_decode($item['merchant-private-item-data']['item']['VALUE']));
        } else {
            if ($item['merchant-private-item-data']['order_total']['VALUE']) {
                $order_total = unserialize(base64_decode($item['merchant-private-item-data']['order_total']['VALUE']));
                $custom_order_totals[] = $order_total;
                $order_total_value = $order_total['value'] * (strrpos($order_total['text'], '-') === false ? 1 : -1);
                $custom_order_totals_total += $currencies->get_value($gc_data[$root]['order-total']['currency']) * $order_total_value;
            } else {
                // For invoices.
                $order->products[] = array('qty' => $item['quantity']['VALUE'], 'name' => $item['item-name']['VALUE'], 'model' => $item['item-description']['VALUE'], 'tax' => 0, 'tax_description' => @$item['tax-table-selector']['VALUE'], 'price' => $item['unit-price']['VALUE'], 'final_price' => $item['unit-price']['VALUE'], 'onetime_charges' => 0, 'weight' => 0, 'products_priced_by_attribute' => 0, 'product_is_free' => 0, 'products_discount_type' => 0, 'products_discount_type_from' => 0, 'id' => @$item['merchant-item-id']['VALUE']);
            }
        }
    }
    $cart = new shoppingCart();
    $prod_attr = gc_get_prattr($order->products);
    foreach ($prod_attr as $product_id => $item_data) {
        //$products_id, $qty = '1', $attributes = '
        $cart->add_cart($product_id, $item_data['qty'], $item_data['attr']);
    }
    // Update values so that order_total modules get the correct values.
    $order->info['total'] = $gc_data[$root]['order-total']['VALUE'];
    $order->info['subtotal'] = $gc_data[$root]['order-total']['VALUE'] - ($shipping_cost + $tax_amt) + @$coupons[0]['applied-amount']['VALUE'] - $custom_order_totals_total;
    $order->info['coupon_code'] = @$coupons[0]['code']['VALUE'];
    $order->info['shipping_method'] = $shipping;
    $order->info['shipping_cost'] = $shipping_cost;
    $order->info['tax_groups']['tax'] = $tax_amt;
    $order->info['currency'] = $gc_data[$root]['order-total']['currency'];
    $order->info['currency_value'] = 1;
开发者ID:digideskio,项目名称:oscmax2,代码行数:67,代码来源:responsehandler.php

示例7: terminateEC

 /**
  * If the EC flow has to be interrupted for any reason, this does the appropriate cleanup and displays status/error messages.
  */
 function terminateEC($error_msg = '', $kill_sess_vars = false, $goto_page = '')
 {
     global $messageStack, $order, $order_total_modules;
     $stackAlert = 'header';
     // debug
     $this->_doDebug('PayPal test Log - terminateEC-A', "goto page: " . $goto_page . "\nerror_msg: " . $error_msg . "\n\nSession data: " . print_r($_SESSION, true));
     if ($kill_sess_vars) {
         if (!empty($_SESSION['paypal_ec_temp'])) {
             $this->ec_delete_user($_SESSION['customer_id']);
         }
         // Unregister the paypal session variables, making the user start over.
         unset($_SESSION['paypal_ec_temp']);
         unset($_SESSION['paypal_ec_token']);
         unset($_SESSION['paypal_ec_payer_id']);
         unset($_SESSION['paypal_ec_payer_info']);
         unset($_SESSION['paypal_ec_final']);
         unset($_SESSION['paypal_ec_markflow']);
         // debug
         $this->zcLog('termEC-1', 'Killed the session vars as requested');
     }
     $this->zcLog('termEC-2', 'BEFORE: $this->showPaymentPage = ' . (int) $this->showPaymentPage . "\nToken Data:" . $_SESSION['paypal_ec_token']);
     // force display of payment page if GV/DC active for this customer
     if (MODULE_ORDER_TOTAL_INSTALLED && $this->showPaymentPage !== true && isset($_SESSION['paypal_ec_token'])) {
         require_once DIR_WS_CLASSES . 'order.php';
         $order = new order();
         require_once DIR_WS_CLASSES . 'order_total.php';
         $order_total_modules = new order_total();
         $order_totals = $order_total_modules->process();
         $selection = $order_total_modules->credit_selection();
         if (sizeof($selection) > 0) {
             $this->showPaymentPage = true;
         }
     }
     // if came from Payment page, don't go back to it
     if ($_SESSION['paypal_ec_markflow'] == 1) {
         $this->showPaymentPage = false;
     }
     // if in DP mode, don't go to payment page ... we've already been there to get here
     if ($goto_page == FILENAME_CHECKOUT_PROCESS) {
         $this->showPaymentPage = false;
     }
     // debug
     $this->zcLog('termEC-3', 'AFTER: $this->showPaymentPage = ' . (int) $this->showPaymentPage);
     if (!empty($_SESSION['customer_first_name']) && !empty($_SESSION['customer_id'])) {
         if ($this->showPaymentPage === true || $goto_page == FILENAME_CHECKOUT_PAYMENT) {
             // debug
             $this->zcLog('termEC-4', 'We ARE logged in, and $this->showPaymentPage === true');
             // if no shipping selected or if shipping cost is < 0 goto shipping page
             if (!$_SESSION['shipping'] || $_SESSION['shipping'] == '' || $_SESSION['shipping']['cost'] < 0) {
                 // debug
                 $this->zcLog('termEC-5', 'Have no shipping method selected, or shipping < 0 so set FILENAME_CHECKOUT_SHIPPING');
                 $redirect_path = FILENAME_CHECKOUT_SHIPPING;
                 $stackAlert = 'checkout_shipping';
             } else {
                 // debug
                 $this->zcLog('termEC-6', 'We DO have a shipping method selected, so goto PAYMENT');
                 $redirect_path = FILENAME_CHECKOUT_PAYMENT;
                 $stackAlert = 'checkout_payment';
             }
         } elseif ($goto_page) {
             // debug
             $this->zcLog('termEC-7', '$this->showPaymentPage NOT true, and have custom page parameter: ' . $goto_page);
             $redirect_path = $goto_page;
             $stackAlert = 'header';
             if ($goto_page == FILENAME_SHOPPING_CART) {
                 $stackAlert = 'shopping_cart';
             }
         } else {
             // debug
             $this->zcLog('termEC-8', '$this->showPaymentPage NOT true, and NO custom page selected ... using SHIPPING as default');
             $redirect_path = FILENAME_CHECKOUT_SHIPPING;
             $stackAlert = 'checkout_shipping';
         }
     } else {
         // debug
         $this->zcLog('termEC-9', 'We are NOT logged in, so set snapshot to Shipping page, and redirect to login');
         $_SESSION['navigation']->set_snapshot(FILENAME_CHECKOUT_SHIPPING);
         $redirect_path = FILENAME_LOGIN;
         $stackAlert = 'login';
     }
     if ($error_msg) {
         $messageStack->add_session($stackAlert, $error_msg, 'error');
     }
     // debug
     $this->zcLog('termEC-10', 'Redirecting to ' . $redirect_path . ' - Stack: ' . $stackAlert . "\n" . 'Message: ' . $error_msg . "\nSession Data: " . print_r($_SESSION, true));
     zen_redirect(zen_href_link($redirect_path, '', 'SSL', true, false));
 }
开发者ID:BGCX067,项目名称:ez-commerce-svn-to-git,代码行数:90,代码来源:paypalwpp.php

示例8: _process

 function _process()
 {
     global $osC_Database, $osC_Session, $osC_Customer, $osC_Currencies, $cart, $order, $payment_modules, $shipping_modules, $order_total_modules;
     // load selected payment module
     require DIR_WS_CLASSES . 'payment.php';
     $payment_modules = new payment($osC_Session->value('payment'));
     // load the selected shipping module
     require DIR_WS_CLASSES . 'shipping.php';
     $shipping_modules = new shipping($osC_Session->value('shipping'));
     $order = new order();
     // load the before_process function from the payment modules
     $payment_modules->before_process();
     require DIR_WS_CLASSES . 'order_total.php';
     $order_total_modules = new order_total();
     $order_totals = $order_total_modules->process();
     $Qorder = $osC_Database->query('insert into :table_orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, customers_ip_address, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, currency, currency_value) values (:customers_id, :customers_name, :customers_company, :customers_street_address, :customers_suburb, :customers_city, :customers_postcode, :customers_state, :customers_country, :customers_telephone, :customers_email_address, :customers_address_format_id, :customers_ip_address, :delivery_name, :delivery_company, :delivery_street_address, :delivery_suburb, :delivery_city, :delivery_postcode, :delivery_state, :delivery_country, :delivery_address_format_id, :billing_name, :billing_company, :billing_street_address, :billing_suburb, :billing_city, :billing_postcode, :billing_state, :billing_country, :billing_address_format_id, :payment_method, :cc_type, :cc_owner, :cc_number, :cc_expires, :date_purchased, :orders_status, :currency, :currency_value)');
     $Qorder->bindTable(':table_orders', TABLE_ORDERS);
     $Qorder->bindInt(':customers_id', $osC_Customer->id);
     $Qorder->bindValue(':customers_name', $order->customer['firstname'] . ' ' . $order->customer['lastname']);
     $Qorder->bindValue(':customers_company', $order->customer['company']);
     $Qorder->bindValue(':customers_street_address', $order->customer['street_address']);
     $Qorder->bindValue(':customers_suburb', $order->customer['suburb']);
     $Qorder->bindValue(':customers_city', $order->customer['city']);
     $Qorder->bindValue(':customers_postcode', $order->customer['postcode']);
     $Qorder->bindValue(':customers_state', $order->customer['state']);
     $Qorder->bindValue(':customers_country', $order->customer['country']['title']);
     $Qorder->bindValue(':customers_telephone', $order->customer['telephone']);
     $Qorder->bindValue(':customers_email_address', $order->customer['email_address']);
     $Qorder->bindInt(':customers_address_format_id', $order->customer['format_id']);
     $Qorder->bindValue(':customers_ip_address', tep_get_ip_address());
     $Qorder->bindValue(':delivery_name', $order->delivery['firstname'] . ' ' . $order->delivery['lastname']);
     $Qorder->bindValue(':delivery_company', $order->delivery['company']);
     $Qorder->bindValue(':delivery_street_address', $order->delivery['street_address']);
     $Qorder->bindValue(':delivery_suburb', $order->delivery['suburb']);
     $Qorder->bindValue(':delivery_city', $order->delivery['city']);
     $Qorder->bindValue(':delivery_postcode', $order->delivery['postcode']);
     $Qorder->bindValue(':delivery_state', $order->delivery['state']);
     $Qorder->bindValue(':delivery_country', $order->delivery['country']['title']);
     $Qorder->bindInt(':delivery_address_format_id', $order->delivery['format_id']);
     $Qorder->bindValue(':billing_name', $order->billing['firstname'] . ' ' . $order->billing['lastname']);
     $Qorder->bindValue(':billing_company', $order->billing['company']);
     $Qorder->bindValue(':billing_street_address', $order->billing['street_address']);
     $Qorder->bindValue(':billing_suburb', $order->billing['suburb']);
     $Qorder->bindValue(':billing_city', $order->billing['city']);
     $Qorder->bindValue(':billing_postcode', $order->billing['postcode']);
     $Qorder->bindValue(':billing_state', $order->billing['state']);
     $Qorder->bindValue(':billing_country', $order->billing['country']['title']);
     $Qorder->bindInt(':billing_address_format_id', $order->billing['format_id']);
     $Qorder->bindValue(':payment_method', $order->info['payment_method']);
     $Qorder->bindValue(':cc_type', $order->info['cc_type']);
     $Qorder->bindValue(':cc_owner', $order->info['cc_owner']);
     $Qorder->bindValue(':cc_number', $order->info['cc_number']);
     $Qorder->bindValue(':cc_expires', $order->info['cc_expires']);
     $Qorder->bindRaw(':date_purchased', 'now()');
     $Qorder->bindValue(':orders_status', $order->info['order_status']);
     $Qorder->bindValue(':currency', $order->info['currency']);
     $Qorder->bindValue(':currency_value', $order->info['currency_value']);
     $Qorder->execute();
     $insert_id = $osC_Database->nextID();
     for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
         $Qtotals = $osC_Database->query('insert into :table_orders_total (orders_id, title, text, value, class, sort_order) values (:orders_id, :title, :text, :value, :class, :sort_order)');
         $Qtotals->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);
         $Qtotals->bindInt(':orders_id', $insert_id);
         $Qtotals->bindValue(':title', $order_totals[$i]['title']);
         $Qtotals->bindValue(':text', $order_totals[$i]['text']);
         $Qtotals->bindValue(':value', $order_totals[$i]['value']);
         $Qtotals->bindValue(':class', $order_totals[$i]['code']);
         $Qtotals->bindInt(':sort_order', $order_totals[$i]['sort_order']);
         $Qtotals->execute();
     }
     $Qstatus = $osC_Database->query('insert into :table_orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values (:orders_id, :orders_status_id, :date_added, :customer_notified, :comments)');
     $Qstatus->bindTable(':table_orders_status_history', TABLE_ORDERS_STATUS_HISTORY);
     $Qstatus->bindInt(':orders_id', $insert_id);
     $Qstatus->bindInt(':orders_status_id', $order->info['order_status']);
     $Qstatus->bindRaw(':date_added', 'now()');
     $Qstatus->bindInt(':customer_notified', SEND_EMAILS == 'true' ? '1' : '0');
     $Qstatus->bindValue(':comments', $order->info['comments']);
     $Qstatus->execute();
     // initialized for the email confirmation
     $products_ordered = '';
     $subtotal = 0;
     $total_tax = 0;
     $total_weight = 0;
     $total_cost = 0;
     for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
         // Stock Update - Joao Correia
         if (STOCK_LIMITED == 'true') {
             if (DOWNLOAD_ENABLED == 'true') {
                 $Qstock = $osC_Database->query('select products_quantity, pad.products_attributes_filename from :table_products p left join :table_products_attributes pa on (p.products_id = pa.products_id) left join :table_products_attributes_download pad on (pa.products_attributes_id = pad.products_attributes_id) where p.products_id = :products_id');
                 $Qstock->bindTable(':table_products', TABLE_PRODUCTS);
                 $Qstock->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
                 $Qstock->bindTable(':table_products_attributes_download', TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD);
                 $Qstock->bindInt(':products_id', tep_get_prid($order->products[$i]['id']));
                 // Will work with only one option for downloadable products otherwise, we have to build the query dynamically with a loop
                 $products_attributes = $order->products[$i]['attributes'];
                 if (is_array($products_attributes)) {
                     $Qstock->appendQuery('and pa.options_id = :options_id and pa.options_values_id = :options_values_id');
                     $Qstock->bindInt(':options_id', $products_attributes[0]['option_id']);
                     $Qstock->bindInt(':options_values_id', $products_attributes[0]['value_id']);
                 }
//.........这里部分代码省略.........
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:101,代码来源:process.php

示例9: tep_db_query

    // verify the selected billing address
    $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id = '" . (int) $billto . "'");
    $check_address = tep_db_fetch_array($check_address_query);
    if ($check_address['total'] != '1') {
        $billto = $customer_default_address_id;
        if (tep_session_is_registered('payment')) {
            tep_session_unregister('payment');
        }
    }
}
require DIR_WS_CLASSES . 'order.php';
$order = new order();
// #################### Added CGV ######################
require DIR_WS_CLASSES . 'order_total.php';
//ICW ADDED FOR CREDIT CLASS SYSTEM
$order_total_modules = new order_total();
//ICW ADDED FOR CREDIT CLASS SYSTEM
$order_total_modules->clear_posts();
// ADDED FOR CREDIT CLASS SYSTEM by Rigadin in v5.13
// #################### End Added CGV ######################
if (!tep_session_is_registered('comments')) {
    tep_session_register('comments');
}
$total_weight = $cart->show_weight();
$total_count = $cart->count_contents();
// #################### Added CGV ######################
$total_count = $cart->count_contents_virtual();
//ICW ADDED FOR CREDIT CLASS SYSTEM
// #################### End Added CGV ######################
// load all enabled payment modules
require DIR_WS_CLASSES . 'payment.php';
开发者ID:eosc,项目名称:EosC-2.3,代码行数:31,代码来源:checkout_payment.php

示例10: array

require 'includes/classes/class_order.php';
$oOrder = new order;

if ( (isset($_SESSION['shipping'])) && ($_SESSION['shipping']['id'] == 'free_free')) {
    if ( ($oOrder->info['total'] - $oOrder->info['shipping_cost']) < MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER ) {
        MyOOS_CoreApi::redirect(oos_href_link($aPages['checkout_shipping'], '', 'SSL'));
    }
}


// load the before_process function from the payment modules
$oPaymentModules->before_process();

require 'includes/classes/class_order_total.php';
$oOrderTotalModules = new order_total;

$order_totals = $oOrderTotalModules->process();

$sql_data_array = array('customers_id' => $_SESSION['customer_id'],
                        'customers_name' => $oOrder->customer['firstname'] . ' ' . $oOrder->customer['lastname'],
                        'customers_number' => $oOrder->customer['number'],
                        'customers_company' => $oOrder->customer['company'],
                        'customers_street_address' => $oOrder->customer['street_address'],
                        'customers_suburb' => $oOrder->customer['suburb'],
                        'customers_city' => $oOrder->customer['city'],
                        'customers_postcode' => $oOrder->customer['postcode'],
                        'customers_state' => $oOrder->customer['state'],
                        'customers_country' => $oOrder->customer['country']['title'],
                        'customers_telephone' => $oOrder->customer['telephone'],
                        'customers_email_address' => $oOrder->customer['email_address'],
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:30,代码来源:checkout_process.php

示例11: olc_db_query

    $check_address_query = olc_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . CUSTOMER_ID . "' and address_book_id = '" . (int) $_SESSION['billto'] . APOS);
    $check_address = olc_db_fetch_array($check_address_query);
    if ($check_address['total'] != '1') {
        $_SESSION['billto'] = $_SESSION['customer_default_address_id'];
        if (isset($_SESSION['payment'])) {
            unset($_SESSION['payment']);
        }
    }
} else {
    $_SESSION['billto'] = $_SESSION['customer_default_address_id'];
}
require_once DIR_WS_CLASSES . 'order.php';
$order = new order();
require_once DIR_WS_CLASSES . 'order_total.php';
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
$order_total_modules = new order_total();
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
$total_weight = $_SESSION['cart']->show_weight();
//  $total_count = $_SESSION['cart']->count_contents();
$total_count = $_SESSION['cart']->count_contents_virtual();
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
if ($order->billing['country']['iso_code_2'] != EMPTY_STRING) {
    $_SESSION['delivery_zone'] = $order->billing['country']['iso_code_2'];
}
// load all enabled payment modules
require_once DIR_WS_CLASSES . 'payment.php';
$payment_modules = new payment();
$breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_PAYMENT, olc_href_link(FILENAME_CHECKOUT_SHIPPING, EMPTY_STRING, SSL));
$breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_PAYMENT, olc_href_link(FILENAME_CHECKOUT_PAYMENT, EMPTY_STRING, SSL));
//W. Kaiser - AJAX
$checkout_payment_text = 'checkout_payment';
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:checkout_payment.php

示例12: order_total

                } else {
                    $tax_val = $products[$i]['final_price'] * $products_tax / 100 * $products[$i]['quantity'];
                }
                $order->info['tax'] += $tax_val;
                $order->info['tax_groups']["{$products_tax_description}"] += $tax_val;
                // Modified by Strider 42 to correct the order total figure when shop displays prices with tax
                if (DISPLAY_PRICE_WITH_TAX == 'true') {
                    $order->info['total'];
                } else {
                    $order->info['total'] += $tax_val;
                }
            }
        }
        // EOF get taxes if not logged in (seems like less code than in order class)
        require DIR_WS_CLASSES . 'order_total.php';
        $order_total_modules = new order_total();
        //echo '</td><td align="right">';
        // order total code
        $order_total_modules->process();
        $info_box_contents = array();
        $info_box_contents[] = array('text' => '<b>' . CART_OT . '</b>');
        //azer version 2.20
        new infoBoxHeading($info_box_contents, false, false);
        $otTxt = '<table border="0" align="right">';
        $otTxt .= $order_total_modules->output() . '</table>';
        $info_box_contents = array();
        $info_box_contents[] = array('text' => $otTxt);
        new infoBox($info_box_contents);
    }
}
// Use only when cart_contents > 0
开发者ID:eosc,项目名称:EosC-2.3,代码行数:31,代码来源:shipping_estimator.php

示例13: htmlentities

            $_SESSION['conditions'] = 'true';
        }
        if ($_POST['withdrawal'] == true) {
            $_SESSION['withdrawal'] = 'true';
        }
    }
}
if (isset($_GET['payment_error'])) {
    $smarty->assign('ERROR', htmlentities($_GET['ret_errormsg']));
}
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
require DIR_WS_CLASSES . 'order_total.php';
require DIR_WS_CLASSES . 'order.php';
$order = new order();
// GV Code Start
$order_total_modules = new order_total();
$order_total_modules->collect_posts();
$order_total_modules->pre_confirmation_check();
// GV Code End
// load the selected payment module
require DIR_WS_CLASSES . 'payment.php';
if (isset($_SESSION['credit_covers'])) {
    $_SESSION['payment'] = 'no_payment';
}
// GV Code Start/End ICW added for CREDIT CLASS
unset($order);
$payment_modules = new payment($_SESSION['payment']);
$order = new order();
// GV Code line changed
// BOF GM_MOD:
if (is_array($payment_modules->modules) && sizeof($payment_modules->selection()) > 1 && !is_object(${$_SESSION}['payment']) && !isset($_SESSION['credit_covers']) || is_object(${$_SESSION}['payment']) && ${$_SESSION}['payment']->enabled == false) {
开发者ID:digitaldevelopers,项目名称:gambio-gx2-bitcoin-payment,代码行数:31,代码来源:checkout_confirmation.php

示例14: order_total

                    $radio_buttons++;
                }
            }
        }
        $module->assign('module_content', $quotes);
    }
    $module->caching = 0;
    $shipping_block = $module->fetch(CURRENT_TEMPLATE . '/module/checkout_shipping_block.html');
}
$vamTemplate->assign('SHIPPING_BLOCK', $shipping_block);
/* END SHIPPING_BLOCK */
/* PAYMENT_BLOCK */
// load all enabled payment modules
require DIR_WS_CLASSES . 'order_total.php';
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
$order_total_modules = new order_total();
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
$payment_modules = new payment();
$order_total_modules->process();
$module = new vamTemplate();
if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
    $vamTemplate->assign('error', htmlspecialchars($error['error']));
}
$selection = $payment_modules->selection();
$radio_buttons = 0;
for ($i = 0, $n = sizeof($selection); $i < $n; $i++) {
    $selection[$i]['radio_buttons'] = $radio_buttons;
    if ($selection[$i]['id'] == $payment || $n == 1) {
        $selection[$i]['checked'] = 1;
    }
    if (sizeof($selection) > 1) {
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:checkout_alternative.php

示例15: pre_confirmation_check

 function pre_confirmation_check()
 {
     global $HTTP_GET_VARS, $order, $ppe_token;
     if (!tep_session_is_registered('ppe_token')) {
         tep_redirect(tep_href_link('ext/modules/payment/paypal/express.php', '', 'SSL'));
     }
     if (!isset($HTTP_GET_VARS['do'])) {
         $response_array = $this->getExpressCheckoutDetails($ppe_token);
         if ($response_array['ACK'] == 'Success' || $response_array['ACK'] == 'SuccessWithWarning') {
             // load the selected shipping module
             include DIR_WS_CLASSES . 'shipping.php';
             $shipping_modules = new shipping($shipping);
             include DIR_WS_CLASSES . 'order_total.php';
             $order_total_modules = new order_total();
             $order_total_modules->process();
             if ($response_array['AMT'] == $this->format_raw($order->info['total'])) {
                 tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'));
             } else {
                 tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'do=confirm', 'SSL'));
             }
         }
     }
 }
开发者ID:neomobil,项目名称:neomobil.hu,代码行数:23,代码来源:paypal_express.php


注:本文中的order_total类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。