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


PHP mslib_fe::getOrder方法代码示例

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


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

示例1: updateOrderStatus

 public function updateOrderStatus($orders_id, $orders_status, $mail_customer = 0)
 {
     if (!is_numeric($orders_id)) {
         return false;
     }
     $continue = 1;
     //hook to let other plugins further manipulate
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_befe.php']['updateOrderStatusPreProc'])) {
         $params = array('orders_id' => &$orders_id, 'orders_status' => &$orders_status, 'mail_customer' => &$mail_customer, 'continue' => &$continue);
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_befe.php']['updateOrderStatusPreProc'] as $funcRef) {
             \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
         }
     }
     if ($continue) {
         $order = mslib_fe::getOrder($orders_id);
         if ($order['orders_id']) {
             // dynamic variables
             if (isset($order['language_id'])) {
                 // Switch to language that is stored in the order
                 mslib_befe::setSystemLanguage($order['language_id']);
             }
             $billing_address = '';
             $delivery_address = '';
             $full_customer_name = $order['billing_first_name'];
             if ($order['billing_middle_name']) {
                 $full_customer_name .= ' ' . $order['billing_middle_name'];
             }
             if ($order['billing_last_name']) {
                 $full_customer_name .= ' ' . $order['billing_last_name'];
             }
             $delivery_full_customer_name = $order['delivery_first_name'];
             if ($order['delivery_middle_name']) {
                 $delivery_full_customer_name .= ' ' . $order['delivery_middle_name'];
             }
             if ($order['delivery_last_name']) {
                 $delivery_full_customer_name .= ' ' . $order['delivery_last_name'];
             }
             $full_customer_name = preg_replace('/\\s+/', ' ', $full_customer_name);
             $delivery_full_customer_name = preg_replace('/\\s+/', ' ', $delivery_full_customer_name);
             if (!$order['delivery_address'] or !$order['delivery_city']) {
                 $order['delivery_company'] = $order['billing_company'];
                 $order['delivery_address'] = $order['billing_address'];
                 $order['delivery_street_name'] = $order['billing_street_name'];
                 $order['delivery_address_number'] = $order['billing_address_number'];
                 $order['delivery_address_ext'] = $order['billing_address_ext'];
                 $order['delivery_building'] = $order['billing_building'];
                 $order['delivery_zip'] = $order['billing_zip'];
                 $order['delivery_city'] = $order['billing_city'];
                 $order['delivery_telephone'] = $order['billing_telephone'];
                 $order['delivery_mobile'] = $order['billing_mobile'];
             }
             if ($order['delivery_company']) {
                 $delivery_address = $order['delivery_company'] . "<br />";
             }
             if ($delivery_full_customer_name) {
                 $delivery_address .= $delivery_full_customer_name . "<br />";
             }
             if ($order['delivery_building']) {
                 $delivery_address .= $order['delivery_building'] . "<br />";
             }
             if ($order['delivery_address']) {
                 $delivery_address .= $order['delivery_address'] . "<br />";
             }
             if ($order['delivery_zip'] and $order['delivery_city']) {
                 $delivery_address .= $order['delivery_zip'] . " " . $order['delivery_city'];
             }
             //if ($order['delivery_telephone']) 		$delivery_address.=ucfirst($this->pi_getLL('telephone')).': '.$order['delivery_telephone']."<br />";
             //if ($order['delivery_mobile']) 			$delivery_address.=ucfirst($this->pi_getLL('mobile')).': '.$order['delivery_mobile']."<br />";
             if ($order['billing_company']) {
                 $billing_address = $order['billing_company'] . "<br />";
             }
             if ($full_customer_name) {
                 $billing_address .= $full_customer_name . "<br />";
             }
             if ($order['billing_building']) {
                 $billing_address .= $order['billing_building'] . "<br />";
             }
             if ($order['billing_address']) {
                 $billing_address .= $order['billing_address'] . "<br />";
             }
             if ($order['billing_zip'] and $order['billing_city']) {
                 $billing_address .= $order['billing_zip'] . " " . $order['billing_city'];
             }
             //if ($order['billing_telephone']) 		$billing_address.=ucfirst($this->pi_getLL('telephone')).': '.$order['billing_telephone']."<br />";
             //if ($order['billing_mobile']) 			$billing_address.=ucfirst($this->pi_getLL('mobile')).': '.$order['billing_mobile']."<br />";
             $array1 = array();
             $array2 = array();
             $array1[] = '###GENDER_SALUTATION###';
             $array2[] = mslib_fe::genderSalutation($order['billing_gender']);
             $array1[] = '###DELIVERY_FIRST_NAME###';
             $array2[] = $order['delivery_first_name'];
             $array1[] = '###DELIVERY_LAST_NAME###';
             $array2[] = preg_replace('/\\s+/', ' ', $order['delivery_middle_name'] . ' ' . $order['delivery_last_name']);
             $array1[] = '###BILLING_FIRST_NAME###';
             $array2[] = $order['billing_first_name'];
             $array1[] = '###BILLING_LAST_NAME###';
             $array2[] = preg_replace('/\\s+/', ' ', $order['billing_middle_name'] . ' ' . $order['billing_last_name']);
             $array1[] = '###BILLING_TELEPHONE###';
             $array2[] = $order['billing_telephone'];
             $array1[] = '###DELIVERY_TELEPHONE###';
//.........这里部分代码省略.........
开发者ID:bvbmedia,项目名称:multishop,代码行数:101,代码来源:class.mslib_befe.php

示例2: die

<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$subpartArray = array();
$subpartArray['###VALUE_REFERRER###'] = '';
if ($this->post['tx_multishop_pi1']['referrer']) {
    $subpartArray['###VALUE_REFERRER###'] = $this->post['tx_multishop_pi1']['referrer'];
} else {
    $subpartArray['###VALUE_REFERRER###'] = $_SERVER['HTTP_REFERER'];
}
if (is_numeric($this->get['orders_id'])) {
    $order = mslib_fe::getOrder($this->get['orders_id']);
    if ($order['customer_id']) {
        if (!($customer_address = mslib_fe::getAddressInfo('customer', $order['customer_id']))) {
            $customer_address['country'] = $order['billing_country'];
            $customer_address['region'] = $order['billing_region'];
        }
        if (!isset($customer_address['country']) && isset($customer_address['default']['country'])) {
            $customer_address = $customer_address['default'];
        }
        $country = mslib_fe::getCountryByName($customer_address['country']);
        if (!empty($customer_address['region'])) {
            $zone = mslib_fe::getRegionByName($customer_address['region']);
        } else {
            $zone['zn_country_iso_nr'] = 0;
        }
    }
    if ($this->ms['MODULES']['ORDER_EDIT']) {
        if (!$order['is_locked']) {
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:zzzz_admin_edit_order.php

示例3: implode

             $excelHeaderCols['product_final_price_excl_tax' . $i] = 'product_final_price_excl_tax' . $i;
             $excelHeaderCols['product_final_price_incl_tax' . $i] = 'product_final_price_incl_tax' . $i;
             $excelHeaderCols['product_price_total_excl_tax' . $i] = 'product_final_price_total_excl_tax' . $i;
             $excelHeaderCols['product_price_total_incl_tax' . $i] = 'product_final_price_total_incl_tax' . $i;
             $excelHeaderCols['product_tax_rate' . $i] = 'product_tax_rate' . $i;
         }
     }
 }
 if ($this->get['format'] == 'excel') {
     $excelRows[] = $excelHeaderCols;
 } else {
     $excelRows[] = implode($post_data['delimeter_type'], $excelHeaderCols);
 }
 foreach ($records as $row) {
     $order_tax_data = unserialize($row['orders_tax_data']);
     $order_tmp = mslib_fe::getOrder($row['orders_id']);
     $excelCols = array();
     $total = count($fields);
     $count = 0;
     foreach ($fields as $counter => $field) {
         $count++;
         $tmpcontent = '';
         switch ($field) {
             case 'orders_id':
                 $excelCols[] = $row['orders_id'];
                 break;
             case 'customer_id':
                 $excelCols[] = $row['customer_id'];
                 break;
             case 'orders_status':
                 $excelCols[] = $row['orders_status'];
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:download_invoices_export.php

示例4: die

<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
if ($this->ms['MODULES']['DELETE_PDF_PACKING_SLIP_AFTER_BEING_DOWNLOADED']) {
    $this->get['tx_multishop_pi1']['forceRecreate'] = 1;
}
$order = array();
if ($this->get['tx_multishop_pi1']['order_id'] && $this->ADMIN_USER) {
    $order_id = $this->get['tx_multishop_pi1']['order_id'];
    $order = mslib_fe::getOrder($order_id);
} elseif ($this->get['tx_multishop_pi1']['order_hash']) {
    $order_hash = $this->get['tx_multishop_pi1']['order_hash'];
    $order = mslib_fe::getOrder($order_hash, 'hash');
}
if (!count($order)) {
    exit;
}
$pdfFileName = 'packingslip_' . $order['hash'] . '.pdf';
$pdfFileName = 'packingslip_' . $order['hash'] . '.pdf';
$pdfFilePath = $this->DOCUMENT_ROOT . 'uploads/tx_multishop/' . $pdfFileName;
if ($this->ms['MODULES']['DELETE_PDF_PACKING_SLIP_AFTER_BEING_DOWNLOADED'] && file_exists($pdfFilePath)) {
    unlink($pdfFilePath);
}
if (($this->get['tx_multishop_pi1']['forceRecreate'] || !file_exists($pdfFilePath)) && $order['hash']) {
    $orders_tax_data = $order['orders_tax_data'];
    if ($order['orders_id']) {
        // now parse all the objects in the tmpl file
        if ($this->conf['admin_packingslip_pdf_tmpl_path']) {
            $template = $this->cObj->fileResource($this->conf['admin_packingslip_pdf_tmpl_path']);
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:download_packingslip.php

示例5: convertCartToOrder


//.........这里部分代码省略.........
             $orders_tax['tax_separation'] = $tax_separation;
             if ($this->ms['MODULES']['DISABLE_VAT_RATE']) {
                 $orders_tax['total_orders_tax'] = 0;
             }
             $orders_tax['grand_total'] = (string) array_sum($grand_total);
             $updateArray['orders_tax_data'] = serialize($orders_tax);
             $updateArray['grand_total'] = $orders_tax['grand_total'];
             if (!empty($cart['coupon_code'])) {
                 $updateArray['coupon_code'] = $cart['coupon_code'];
                 $updateArray['coupon_discount_type'] = $cart['discount_type'];
                 $updateArray['coupon_discount_value'] = $cart['discount'];
             }
             $updateArray['orders_last_modified'] = time();
             $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_orders', 'orders_id=\'' . $orders_id . '\'', $updateArray);
             $res = $GLOBALS['TYPO3_DB']->sql_query($query);
             if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderDiscountPreProc'])) {
                 // hook
                 $params = array('ms' => $this->ms, 'orders_id' => $orders_id, 'cart' => &$cart);
                 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderDiscountPreProc'] as $funcRef) {
                     \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
                 }
                 // hook oef
             }
             if ($cart['discount']) {
                 if ($cart['discount']) {
                     if ($cart['coupon_code']) {
                         $str = "update tx_multishop_coupons set times_used=(times_used+1) where code='" . addslashes($cart['coupon_code']) . "'";
                         $res = $GLOBALS['TYPO3_DB']->sql_query($str);
                         $cart['coupon_code'] = '';
                     }
                     $cart['discount'] = '';
                     $cart['discount_type'] = '';
                 }
             }
             mslib_befe::storeCustomerCartContent($cart, $customer_id, 1);
             // debug
             /*
             $order=mslib_fe::getOrder($orders_id);
             $ORDER_DETAILS=mslib_fe::printOrderDetailsTable($order,'email');
             echo $ORDER_DETAILS;
             die();
             */
             if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderPostHook'])) {
                 // hook
                 $params = array('cart' => &$cart, 'orders_id' => &$orders_id);
                 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderPostHook'] as $funcRef) {
                     \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
                 }
                 // hook oef
             }
             $cart['products'] = array();
             //unset($cart['user']);
             unset($cart['discount_type']);
             unset($cart['discount_amount']);
             //$GLOBALS['TSFE']->fe_user->setKey('ses', $this->cart_page_uid, $cart);
             //$GLOBALS['TSFE']->storeSessionData();
             tx_mslib_cart::storeCart($cart);
             // unset the cart with original key
             $plain_cart_key = 'tx_multishop_cart';
             if ($this->ms['MODULES']['CART_PAGE_UID']) {
                 $plain_cart_key .= '_' . $this->ms['MODULES']['CART_PAGE_UID'];
             }
             $cart2 = $GLOBALS['TSFE']->fe_user->getKey('ses', $plain_cart_key);
             $cart2['products'] = array();
             //unset($cart2['user']);
             unset($cart2['discount_type']);
             unset($cart2['discount_amount']);
             //TODO: plain cart key?
             //$GLOBALS['TSFE']->fe_user->setKey('ses', $plain_cart_key, $cart2);
             //$GLOBALS['TSFE']->storeSessionData();
             tx_mslib_cart::storeCart($cart2);
             // custom error script for checkout
             if ($this->ms['MODULES']['ORDERS_CUSTOM_EXPORT_SCRIPT']) {
                 if (strstr($this->ms['MODULES']['ORDERS_CUSTOM_EXPORT_SCRIPT'], "..")) {
                     die('error in ORDERS_CUSTOM_EXPORT_SCRIPT value');
                 } else {
                     require $this->DOCUMENT_ROOT . $this->ms['MODULES']['ORDERS_CUSTOM_EXPORT_SCRIPT'] . '.php';
                 }
             }
             require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'pi1/classes/class.tx_mslib_order.php';
             $mslib_order = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_mslib_order');
             $mslib_order->init($this);
             $mslib_order->repairOrder($orders_id);
             // if grand total is zero we have to activate directly
             $order = mslib_fe::getOrder($orders_id);
             if ($order['orders_id'] and $order['grand_total'] < 0.001) {
                 mslib_fe::updateOrderStatusToPaid($order['orders_id']);
             }
             if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderLastPostHook'])) {
                 // hook
                 $params = array('orders_id' => &$orders_id);
                 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderLastPostHook'] as $funcRef) {
                     \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
                 }
                 // hook oef
             }
             return $orders_id;
         }
     }
 }
开发者ID:bvbmedia,项目名称:multishop,代码行数:101,代码来源:class.tx_mslib_cart.php

示例6: createOrderInvoice

 public function createOrderInvoice($orders_id, $force = 0)
 {
     if (!is_numeric($orders_id)) {
         return false;
     }
     if (is_numeric($orders_id)) {
         $order = mslib_fe::getOrder($orders_id);
         if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.tx_mslib_fe.php']['forceCreateOrderInvoice'])) {
             $params = array('force' => &$force, 'order' => $order);
             foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.tx_mslib_fe.php']['forceCreateOrderInvoice'] as $funcRef) {
                 \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
             }
         }
         if (!$force && $order['total_amount'] == 0) {
             // it does not make sense to create an invoice without an amount
             return false;
         }
         if ($order['orders_id'] and $order['bill'] or $order['orders_id'] and $force) {
             $invoice_id = mslib_fe::generateInvoiceId();
             if ($invoice_id) {
                 $hash = md5(uniqid('', true));
                 $insertArray = array();
                 $insertArray['invoice_id'] = $invoice_id;
                 $insertArray['customer_id'] = $order['customer_id'];
                 $insertArray['paid'] = $order['paid'];
                 $insertArray['orders_id'] = $orders_id;
                 $insertArray['crdate'] = time();
                 $insertArray['status'] = 1;
                 $insertArray['page_uid'] = $this->shop_pid;
                 $insertArray['hash'] = $hash;
                 $insertArray['invoice_grand_total'] = $order['grand_total'];
                 $insertArray['invoice_grand_total_excluding_vat'] = $order['grand_total_excluding_vat'];
                 $insertArray['discount'] = $order['discount'];
                 $insertArray['payment_condition'] = $order['payment_condition'];
                 if ($order['billing_company']) {
                     $name = $order['billing_company'];
                 } else {
                     $name = $order['billing_name'];
                 }
                 $insertArray['ordered_by'] = $name;
                 $insertArray['debit_invoice'] = '0';
                 if ($order['debit_order']) {
                     $insertArray['debit_invoice'] = '1';
                 }
                 $query = $GLOBALS['TYPO3_DB']->INSERTquery('tx_multishop_invoices', $insertArray);
                 $res = $GLOBALS['TYPO3_DB']->sql_query($query);
                 if ($res) {
                     // update order to billed and lock the order so nobody can adjust it
                     if ($this->ms['MODULES']['LOCK_ORDER_AFTER_CREATING_INVOICE']) {
                         $lock_order = 1;
                     } else {
                         $lock_order = 0;
                     }
                     $updateArray = array('bill' => 0, 'is_locked' => $lock_order);
                     $updateArray['orders_last_modified'] = time();
                     $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_orders', 'orders_id=' . $order['orders_id'], $updateArray);
                     $res = $GLOBALS['TYPO3_DB']->sql_query($query);
                     $array = array();
                     $array['hash'] = $hash;
                     $array['invoice_id'] = $invoice_id;
                     return $array;
                 } else {
                     // Fail
                     $array = array();
                     $array['erno'] = array();
                     $array['erno'][] = $GLOBALS['TYPO3_DB']->sql_error();
                     return $array;
                 }
             }
         }
     }
 }
开发者ID:bvbmedia,项目名称:multishop,代码行数:72,代码来源:class.mslib_fe.php

示例7: elseif

                         }
                     } elseif ($this->post['tx_multishop_pi1']['action'] == 'update_selected_orders_to_not_paid') {
                         $updateArray = array('paid' => 0);
                         $updateArray['orders_last_modified'] = time();
                         $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_orders', 'orders_id=' . $orders_id, $updateArray);
                         $res = $GLOBALS['TYPO3_DB']->sql_query($query);
                     }
                 }
             }
         }
     }
     break;
 case 'mail_selected_orders_for_payment_reminder':
     if (is_array($this->post['selected_orders']) and count($this->post['selected_orders'])) {
         foreach ($this->post['selected_orders'] as $orders_id) {
             $tmpArray = mslib_fe::getOrder($orders_id);
             //=mslib_befe::getRecord($orders_id, 'tx_multishop_orders', 'orders_id');
             if ($tmpArray['paid'] == 0) {
                 // replacing the variables with dynamic values
                 $billing_address = '';
                 $delivery_address = '';
                 $full_customer_name = $tmpArray['billing_first_name'];
                 if ($tmpArray['billing_middle_name']) {
                     $full_customer_name .= ' ' . $tmpArray['billing_middle_name'];
                 }
                 if ($tmpArray['billing_last_name']) {
                     $full_customer_name .= ' ' . $tmpArray['billing_last_name'];
                 }
                 $delivery_full_customer_name = $tmpArray['delivery_first_name'];
                 if ($tmpArray['delivery_middle_name']) {
                     $delivery_full_customer_name .= ' ' . $tmpArray['delivery_middle_name'];
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:admin_orders.php

示例8: array

     $array1 = array();
     $array2 = array();
     $array1[] = '###PAYMENT_FALLBACK_LINK###';
     $array2[] = '';
     $array1[] = '###PAYMENT_PAGE_LINK###';
     $array2[] = '';
     $content = str_replace($array1, $array2, $content);
     // custom hook that can be controlled by third-party plugin eof
     break;
     // psp thank you or error pages eof
 // psp thank you or error pages eof
 case 'payment_reminder_checkout':
     if ($this->get['tx_multishop_pi1']['hash']) {
         $tmpArray = mslib_befe::getRecord($this->get['tx_multishop_pi1']['hash'], 'tx_multishop_orders', 'hash');
         if ($tmpArray['orders_id']) {
             $order = mslib_fe::getOrder($tmpArray['orders_id']);
             // replacing the variables with dynamic values
             $billing_address = '';
             $delivery_address = '';
             $full_customer_name = $order['billing_first_name'];
             if ($order['billing_middle_name']) {
                 $full_customer_name .= ' ' . $order['billing_middle_name'];
             }
             if ($order['billing_last_name']) {
                 $full_customer_name .= ' ' . $order['billing_last_name'];
             }
             $delivery_full_customer_name = $order['delivery_first_name'];
             if ($order['delivery_middle_name']) {
                 $delivery_full_customer_name .= ' ' . $order['delivery_middle_name'];
             }
             if ($order['delivery_last_name']) {
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:core.php

示例9: getOrderWeight

 function getOrderWeight($orders_id)
 {
     if (is_numeric($orders_id)) {
         $weight = 0;
         $order = mslib_fe::getOrder($orders_id);
         foreach ($order['products'] as $product) {
             if (is_numeric($product['products_id'])) {
                 $product_db = mslib_fe::getProduct($product['products_id']);
                 $weight = $weight + $product['qty'] * $product_db['products_weight'];
             }
         }
         return $weight;
     }
 }
开发者ID:bvbmedia,项目名称:multishop,代码行数:14,代码来源:class.tx_mslib_order.php

示例10: number_format

 $product = mslib_fe::getProduct($this->get['pid'], '', '', 1, 1);
 $quantity = $this->get['qty'];
 if ($product['staffel_price']) {
     $staffel_price['price'] = mslib_fe::calculateStaffelPrice($product['staffel_price'], $quantity) / $quantity;
 } else {
     $staffel_price['price'] = $product['final_price'];
 }
 //if ($this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT']) {
 $staffel_price['price_include_vat'] = $staffel_price['price'] + $staffel_price['price'] * $product['tax_rate'];
 //}
 $staffel_price['display_price'] = number_format($staffel_price['price'], 2, '.', '');
 $staffel_price['display_price_include_vat'] = number_format($staffel_price['price_include_vat'], 2, '.', '');
 //
 $staffel_price['use_tax_id'] = true;
 if (isset($this->get['oid']) && is_numeric($this->get['oid']) && $this->get['oid'] > 0) {
     $orders = mslib_fe::getOrder($this->get['oid']);
     $iso_customer = mslib_fe::getCountryByName($orders['billing_country']);
     $iso_customer['country'] = $iso_customer['cn_short_en'];
     $vat_id = $orders['billing_vat_id'];
     // hook for adding new fieldsets into edit_order
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/ajax_products_staffelprice_search.php']['ajaxProductsStaffelPriceSearchExistingOrder'])) {
         $params = array('vat_id' => &$vat_id, 'orders' => &$orders);
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/ajax_pages/ajax_products_staffelprice_search.php']['ajaxProductsStaffelPriceSearchExistingOrder'] as $funcRef) {
             \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
         }
         // hook oef
     }
     $this->ms['MODULES']['DISABLE_VAT_RATE'] = 0;
     if (strtolower($iso_customer['country']) != strtolower($this->tta_shop_info['country'])) {
         if ($this->ms['MODULES']['DISABLE_VAT_FOR_FOREIGN_CUSTOMERS_WITH_COMPANY_VAT_ID'] and $vat_id) {
             $this->ms['MODULES']['DISABLE_VAT_RATE'] = 1;
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:ajax_products_staffelprice_search.php

示例11: htmlspecialchars

                    if ($this->ms['MODULES']['ENABLE_REORDER_FEATURE_IN_ACCOUNT_ORDER_HISTORY']) {
                        $content .= '
						<div id="navigation">
							<a href="' . mslib_fe::typolink('', 'tx_multishop_pi1[re-order]=1&tx_multishop_pi1[orders_id]=' . $order['orders_id']) . '" class="msFrontButton continueState arrowRight arrowPosLeft"><input type="submit" value="' . htmlspecialchars($this->pi_getLL('re-order')) . '" /></a>
						</div>
						';
                    }
                    $content .= '
					</div>					
					';
                }
            }
            break;
        default:
            if ($this->ms['MODULES']['ENABLE_REORDER_FEATURE_IN_ACCOUNT_ORDER_HISTORY'] && is_numeric($this->get['tx_multishop_pi1']['orders_id']) and $this->get['tx_multishop_pi1']['re-order']) {
                $order = mslib_fe::getOrder($this->get['tx_multishop_pi1']['orders_id']);
                if ($order['customer_id'] == $GLOBALS['TSFE']->fe_user->user['uid']) {
                    foreach ($order['products'] as $product) {
                        $this->post = array();
                        $this->post['products_id'] = $product['products_id'];
                        $this->post['quantity'] = number_format($product['qty']);
                        if (is_array($product['attributes']) and count($product['attributes'])) {
                            foreach ($product['attributes'] as $attribute) {
                                if ($attribute['products_options_values_id']) {
                                    $value = $attribute['products_options_values_id'];
                                } else {
                                    $value = $attribute['products_options_values'];
                                }
                                $this->post['attributes'][$attribute['products_options_id']][] = $value;
                            }
                        }
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:default.php

示例12: json_encode

         }
     }
     echo json_encode($return_data);
     exit;
     break;
 case 'update_invoice_paid_status_save_popup_value':
     $return_data = array();
     $order_id = $this->post['tx_multishop_pi1']['order_id'];
     $invoice_id = $this->post['tx_multishop_pi1']['invoice_id'];
     $invoice_nr = $this->post['tx_multishop_pi1']['invoice_nr'];
     $return_data['status'] = 'NOTOK';
     $return_data['status'] = 'NOTOK';
     if (is_numeric($invoice_id)) {
         $invoice = mslib_fe::getInvoice($invoice_id, 'id');
         if ($invoice['id']) {
             $order = mslib_fe::getOrder($invoice['orders_id']);
             if ($order['orders_id']) {
                 $date_paid = strtotime($this->post['tx_multishop_pi1']['date_paid']);
                 $payment_id = $this->post['tx_multishop_pi1']['payment_id'];
                 //
                 if (is_numeric($payment_id) && $payment_id > 0) {
                     $payment_method = mslib_fe::getPaymentMethod($payment_id);
                     $updateArray = array();
                     $updateArray['payment_method_costs'] = $payment_method['handling_costs'];
                     $updateArray['payment_method'] = $payment_method['code'];
                     $updateArray['payment_method_label'] = $payment_method['name'];
                     $updateArray['orders_last_modified'] = time();
                     $updateArray['orders_paid_timestamp'] = $date_paid;
                     $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_orders', 'orders_id=\'' . $order_id . '\'', $updateArray);
                     $res = $GLOBALS['TYPO3_DB']->sql_query($query);
                     //
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:admin_ajax_edit_order.php

示例13: CheckoutStepping

$mslib_cart = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_mslib_cart');
$mslib_cart->init($this);
$cart = $mslib_cart->getCart();
if (!count($cart['products'])) {
    $content .= '<div class="noitems_message">' . $this->pi_getLL('there_are_no_products_in_your_cart') . '</div>';
} else {
    if ($this->post) {
        require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'pi1/classes/class.tx_mslib_order.php';
        $mslib_order = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_mslib_order');
        $mslib_order->init($this);
        $orders_id = $mslib_cart->convertCartToOrder($GLOBALS['TSFE']->fe_user->getKey('ses', $this->cart_page_uid));
        if ($orders_id) {
            $show_thank_you = 1;
            if ($show_thank_you) {
                // reload the order so all vars are the same
                $order = mslib_fe::getOrder($orders_id);
                $content .= CheckoutStepping($stepCodes, current($stepCodes), $this);
                // good, proceed to the thank you page
                $send_mail = 1;
                if ($send_mail) {
                    // replacing the variables with dynamic values eof
                    // $user=array();
                    // $user['name']	= $full_customer_name;
                    // $user['email']	= $address['email'];
                    mslib_fe::mailOrder($orders_id, 1);
                }
                $order = $GLOBALS['TSFE']->fe_user->getKey('ses', 'tx_multishop_order');
                $order['orders_id'] = $orders_id;
                $GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_multishop_order', $order);
                $GLOBALS['TSFE']->storeSessionData();
                next($stepCodes);
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:checkout_process.php

示例14: die

<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$content .= '<div class="checkout_thank_you">';
$order_session = $GLOBALS['TSFE']->fe_user->getKey('ses', 'tx_multishop_order');
if (!$order_session['orders_id']) {
    $content .= 'Something went wrong. Please contact the support department.';
} else {
    $order = mslib_fe::getOrder($order_session['orders_id']);
    $orders_id = $order['orders_id'];
    // replacing the variables with dynamic values
    $billing_address = '';
    $delivery_address = '';
    $full_customer_name = $order['billing_first_name'];
    if ($order['billing_middle_name']) {
        $full_customer_name .= ' ' . $order['billing_middle_name'];
    }
    if ($order['billing_last_name']) {
        $full_customer_name .= ' ' . $order['billing_last_name'];
    }
    $delivery_full_customer_name = $order['delivery_first_name'];
    if ($order['delivery_middle_name']) {
        $delivery_full_customer_name .= ' ' . $order['delivery_middle_name'];
    }
    if ($order['delivery_last_name']) {
        $delivery_full_customer_name .= ' ' . $order['delivery_last_name'];
    }
    $full_customer_name = preg_replace('/\\s+/', ' ', $full_customer_name);
    $delivery_full_customer_name = preg_replace('/\\s+/', ' ', $delivery_full_customer_name);
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:checkout_finished.php


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