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


PHP mslib_fe::loggedin方法代码示例

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


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

示例1: array

                if (count($pids)) {
                    $mapped_shipping_methods_product = mslib_fe::getProductMappedMethods($pids, 'shipping', $tmp_countries['cn_iso_nr']);
                }
            }
            break;
        case 'customers_groups':
            if (mslib_fe::loggedin() && $this->ms['MODULES']['GROUP_EDIT_METHOD_FILTER']) {
                $user_groups = array();
                $user_groups = explode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']);
                if (count($user_groups)) {
                    $mapped_shipping_methods_group = mslib_fe::getCustomerGroupMappedMethods($user_groups, 'shipping', $tmp_countries['cn_iso_nr']);
                }
            }
            break;
        case 'customers':
            if (mslib_fe::loggedin() && $this->ms['MODULES']['CUSTOMER_EDIT_METHOD_FILTER']) {
                $user_id = array();
                $user_id = $GLOBALS['TSFE']->fe_user->user['uid'];
                if (is_numeric($user_id)) {
                    $mapped_shipping_methods_user = mslib_fe::getCustomerMappedMethods($user_id, 'shipping', $tmp_countries['cn_iso_nr']);
                }
            }
            break;
    }
}
if (count($mapped_shipping_methods_user)) {
    $mapped_shipping_methods = $mapped_shipping_methods_user;
} else {
    if (count($mapped_shipping_methods_group)) {
        $mapped_shipping_methods = $mapped_shipping_methods_group;
    } else {
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:get_method_costs.php

示例2: die

<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
$GLOBALS['TSFE']->additionalHeaderData[] = '<meta name="robots" content="noindex">' . "\n";
if (!mslib_fe::loggedin() and $this->ms['MODULES']['DISABLE_CHECKOUT_FOR_GUESTS']) {
    // redirect to login page
    header('Location: ' . $this->FULL_HTTP_URL . mslib_fe::typolink($this->conf['login_pid']));
    exit;
}
// minimum order amount
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'pi1/classes/class.tx_mslib_cart.php';
$mslib_cart = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_mslib_cart');
$mslib_cart->init($this);
$cart = $mslib_cart->getCart();
$cart_total_amount = $mslib_cart->countCartTotalPrice(0);
$count_products = count($cart['products']);
if (!empty($this->ms['MODULES']['MINIMUM_ORDER_AMOUNT']) && $this->ms['MODULES']['MINIMUM_ORDER_AMOUNT'] > 0) {
    if ($cart_total_amount < $this->ms['MODULES']['MINIMUM_ORDER_AMOUNT']) {
        // redirect to shopping cart page
        header('Location: ' . $this->FULL_HTTP_URL . mslib_fe::typolink($this->conf['shoppingcart_page_pid'], '&tx_multishop_pi1[page_section]=shopping_cart'));
        exit;
    }
}
// maximum order amount
if (!empty($this->ms['MODULES']['MAXIMUM_ORDER_AMOUNT']) && $this->ms['MODULES']['MAXIMUM_ORDER_AMOUNT'] > 0) {
    if ($cart_total_amount > $this->ms['MODULES']['MAXIMUM_ORDER_AMOUNT']) {
        // redirect to shopping cart page
        header('Location: ' . $this->FULL_HTTP_URL . mslib_fe::typolink($this->conf['shoppingcart_page_pid'], '&tx_multishop_pi1[page_section]=shopping_cart'));
        exit;
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:checkout.php

示例3: taxRuleSet

 public function taxRuleSet($tax_group_id, $current_price, $cn_iso_nr = 0, $zn_country_iso_nr = 0)
 {
     if (!$zn_country_iso_nr) {
         if (mslib_fe::loggedin()) {
             if (!$this->ADMIN_USER) {
                 if (!$this->tta_user_info) {
                     $row_shop_address = $this->tta_shop_info;
                 } else {
                     $row_shop_address = $this->tta_user_info['default'];
                 }
             } else {
                 $row_shop_address = $this->tta_shop_info;
             }
         } else {
             $row_shop_address = $this->tta_shop_info;
         }
         if (isset($row_shop_address['region']) && !empty($row_shop_address['region'])) {
             $zone_id = mslib_fe::getRegionByName($row_shop_address['region']);
             $zn_country_iso_nr = $zone_id['uid'];
         }
     }
     if ($tax_group_id) {
         $sql_local_tax_rate = $GLOBALS['TYPO3_DB']->SELECTquery('mt.rate as tax_rate,mt_c.rate as country_tax_rate,sc.cn_iso_nr as country_id,sc.cn_short_en as country_name,scz.uid as state_id,scz.zn_name_local as state_name,mtr.state_modus', 'tx_multishop_taxes mt LEFT JOIN tx_multishop_tax_rules mtr on mtr.tax_id = mt.tax_id LEFT JOIN tx_multishop_taxes mt_c on mtr.country_tax_id = mt_c.tax_id LEFT JOIN static_countries sc on sc.cn_iso_nr = mtr.cn_iso_nr LEFT JOIN static_country_zones scz on mtr.zn_country_iso_nr = scz.uid', 'mtr.status = 1 and mtr.cn_iso_nr = \'' . addslashes($cn_iso_nr) . '\' and mtr.zn_country_iso_nr = \'' . addslashes($zn_country_iso_nr) . '\' and mtr.rules_group_id = \'' . addslashes($tax_group_id) . '\'', '', '', '');
         $qry_local_tax_rate = $GLOBALS['TYPO3_DB']->sql_query($sql_local_tax_rate);
         // retry to get the tax ruleset only for the country
         if (!$GLOBALS['TYPO3_DB']->sql_num_rows($qry_local_tax_rate) && $zn_country_iso_nr > 0) {
             $sql_local_tax_rate = $GLOBALS['TYPO3_DB']->SELECTquery('mt.rate as tax_rate,mt_c.rate as country_tax_rate,sc.cn_iso_nr as country_id,sc.cn_short_en as country_name,scz.uid as state_id,scz.zn_name_local as state_name,mtr.state_modus', 'tx_multishop_taxes mt left join tx_multishop_tax_rules mtr on mtr.tax_id = mt.tax_id left join tx_multishop_taxes mt_c on mtr.country_tax_id = mt_c.tax_id left join static_countries sc on sc.cn_iso_nr = mtr.cn_iso_nr left join static_country_zones scz on mtr.zn_country_iso_nr = scz.uid', 'mtr.status = 1 and mtr.cn_iso_nr = \'' . addslashes($cn_iso_nr) . '\' and mtr.zn_country_iso_nr = 0 and mtr.rules_group_id = \'' . addslashes($tax_group_id) . '\'', '', '', '');
             $qry_local_tax_rate = $GLOBALS['TYPO3_DB']->sql_query($sql_local_tax_rate);
         }
         if (!$GLOBALS['TYPO3_DB']->sql_num_rows($qry_local_tax_rate)) {
             return false;
         }
         $tax_data = array();
         while ($row_local_tax_rate = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry_local_tax_rate)) {
             $tax_data['local'] = $row_local_tax_rate;
         }
         if ($tax_data['local']['state_modus'] == 2) {
             $state_tax_rate = $tax_data['local']['tax_rate'];
             $country_tax_rate = $tax_data['local']['country_tax_rate'];
             $total_tax_rate = $state_tax_rate + $country_tax_rate;
             $data['state_tax'] = $state_tax;
             $data['country_tax'] = $country_tax;
             $data['state_tax_rate'] = $state_tax_rate;
             $data['country_tax_rate'] = $country_tax_rate;
             $data['total_tax_rate'] = $total_tax_rate;
         } else {
             $tax_rate = $tax_data['local']['tax_rate'];
             $total_tax_rate = $tax_rate;
             $data['tax'] = $tax;
             $data['tax_rate'] = $tax_rate;
             $data['total_tax_rate'] = $total_tax_rate;
         }
         return $data;
     }
     return false;
 }
开发者ID:bvbmedia,项目名称:multishop,代码行数:56,代码来源:class.mslib_fe.php

示例4: die

<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
//$cart=$GLOBALS['TSFE']->fe_user->getKey('ses', $this->cart_page_uid);
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'pi1/classes/class.tx_mslib_cart.php';
$mslib_cart = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_mslib_cart');
$mslib_cart->init($this);
$cart = $mslib_cart->getCart();
if (count($cart['products']) < 1) {
    $content .= '<div class="noitems_message">' . $this->pi_getLL('there_are_no_products_in_your_cart') . '</div>';
} else {
    if (mslib_fe::loggedin()) {
        if (isset($cart['user']['first_name']) && isset($cart['user']['street_name'])) {
            $user = $cart['user'];
        } else {
            $billing_address = mslib_fe::getFeUserTTaddressDetails($GLOBALS['TSFE']->fe_user->user['uid']);
            if (is_array($billing_address)) {
                $user = array();
                $user['first_name'] = $billing_address['first_name'];
                $user['middle_name'] = $billing_address['middle_name'];
                $user['last_name'] = $billing_address['last_name'];
                $user['gender'] = $billing_address['gender'] == 0 ? "m" : "f";
                $user['company'] = $billing_address['company'];
                $user['tx_multishop_newsletter'] = $billing_address['tx_multishop_newsletter'];
                $user['address_ext'] = $billing_address['address_ext'];
                $user['building'] = $billing_address['building'];
                $user['street_name'] = $billing_address['street_name'];
                $user['address_number'] = $billing_address['address_number'];
                $user['address'] = $billing_address['building'] . ' ' . $billing_address['street_name'] . ' ' . $billing_address['address_number'] . ($billing_address['address_ext'] ? '-' . $billing_address['address_ext'] : '');
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:checkout_address.php

示例5: main


//.........这里部分代码省略.........
                    case 'checkout':
                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['checkoutPreProc'])) {
                            $params = array();
                            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['checkoutPreProc'] as $funcRef) {
                                \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
                            }
                        }
                        if ($this->ms['MODULES']['FORCE_CHECKOUT_SHOW_PRICES_INCLUDING_VAT']) {
                            $this->ms['MODULES']['SHOW_PRICES_INCLUDING_VAT'] = 1;
                        }
                        $this->ms['page'] = 'checkout';
                        if (strstr($this->ms['MODULES']['CHECKOUT_TYPE'], "..")) {
                            die('error in CHECKOUT_TYPE value');
                        } else {
                            if (strstr($this->ms['MODULES']['CHECKOUT_TYPE'], "/")) {
                                // relative mode
                                require $this->DOCUMENT_ROOT . $this->ms['MODULES']['CHECKOUT_TYPE'] . '/checkout.php';
                            } else {
                                require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/includes/checkout/' . $this->ms['MODULES']['CHECKOUT_TYPE'] . '/checkout.php';
                            }
                        }
                        $content = '<div id="tx_multishop_pi1_core">' . $content . '</div>';
                        break;
                    case 'create_account':
                        require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/create_account.php';
                        break;
                    case 'edit_account':
                        require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/edit_account.php';
                        break;
                    case 'store_locator':
                        require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/store_locator.php';
                        break;
                    case 'order_history':
                        if (mslib_fe::loggedin()) {
                            if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['order_historyPreProc'])) {
                                $params = array();
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['order_historyPreProc'] as $funcRef) {
                                    \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
                                }
                            }
                            if (strstr($this->ms['MODULES']['ORDER_HISTORY_TYPE'], "..")) {
                                die('error in ORDER_HISTORY_TYPE value');
                            } else {
                                if (strstr($this->ms['MODULES']['ORDER_HISTORY_TYPE'], "/")) {
                                    // relative mode
                                    require $this->DOCUMENT_ROOT . $this->ms['MODULES']['ORDER_HISTORY_TYPE'] . '.php';
                                } else {
                                    require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/includes/order_history/default.php';
                                }
                            }
                        }
                        $content = '<div id="tx_multishop_pi1_core">' . $content . '</div>';
                        break;
                    case 'currency_selector':
                        require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/front_pages/includes/content_elements/currency_selector.php';
                        break;
                    default:
                        // more items could be added through hook
                        $filePath = '';
                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['contentMisc'])) {
                            $params = array('contentMisc' => &$this->contentMisc, 'filePath' => &$filePath);
                            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['contentMisc'] as $funcRef) {
                                \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
                            }
                        }
                        if ($filePath) {
开发者ID:bvbmedia,项目名称:multishop,代码行数:67,代码来源:class.tx_multishop_pi1.php


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