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


PHP utility::isB2B方法代码示例

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


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

示例1: isInstalled

 public function isInstalled()
 {
     if (utility::isB2B() === false) {
         return false;
     }
     return (bool) defined('MODULE_ORDER_TOTAL_TERMS_HANDLING_STATUS');
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:7,代码来源:terms_handling.php

示例2: process

 function process()
 {
     global $lC_ShoppingCart, $lC_Currencies;
     // restrict to payment and confirmation pages
     if (strstr($_SERVER['REQUEST_URI'], 'shipping=process') || strstr($_SERVER['REQUEST_URI'], 'confirmation')) {
         if (utility::isB2B() === true) {
             $value = isset($_SESSION['this_handling']) && $_SESSION['this_handling'] > 0 ? $_SESSION['this_handling'] : 0;
             $this->output[] = array('title' => $this->_title . ':', 'text' => $lC_Currencies->getSessionSymbolLeft() . number_format($value, DECIMAL_PLACES) . $lC_Currencies->getSessionSymbolRight(), 'value' => $value);
         }
     }
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:11,代码来源:terms_handling.php

示例3: __construct

 /**
  * Constructor; load the category structure relationship data from the database
  *
  * @access public
  */
 public function __construct()
 {
     global $lC_Database, $lC_Cache, $lC_Language, $lC_Customer;
     if (SERVICES_CATEGORY_PATH_CALCULATE_PRODUCT_COUNT == '1') {
         $this->_show_total_products = true;
     }
     if ($lC_Cache->isEnabled() && $lC_Cache->read('category_tree-' . $lC_Language->getCode(), 720)) {
         $this->_data = $lC_Cache->getCache();
     } else {
         $Qcategories = $lC_Database->query('select c.categories_id, c.categories_image, c.parent_id, c.categories_mode, c.categories_link_target, c.categories_custom_url, c.categories_status, c.categories_visibility_nav, c.categories_visibility_box, c.access_levels, cd.categories_name, cd.categories_menu_name from :table_categories c, :table_categories_description cd where c.categories_status = 1 and c.categories_id = cd.categories_id and cd.language_id = :language_id');
         $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);
         $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
         $Qcategories->bindInt(':language_id', $lC_Language->getID());
         $Qcategories->appendQuery('order by c.parent_id, c.sort_order, cd.categories_name, cd.categories_menu_name');
         $Qcategories->execute();
         while ($Qcategories->next()) {
             // added to grab permalink if exists
             $Qpermalink = $lC_Database->query('select item_id, query, permalink from :table_permalinks where item_id = :item_id and language_id = :language_id and type = 1 limit 1');
             $Qpermalink->bindTable(':table_permalinks', TABLE_PERMALINKS);
             $Qpermalink->bindInt(':item_id', $Qcategories->valueInt('categories_id'));
             $Qpermalink->bindInt(':language_id', $lC_Language->getID());
             $Qpermalink->execute();
             $this->_data[$Qcategories->valueInt('parent_id')][$Qcategories->valueInt('categories_id')] = array('item_id' => $Qpermalink->valueInt('item_id'), 'name' => $Qcategories->value('categories_name'), 'menu_name' => $Qcategories->value('categories_menu_name'), 'query' => $Qpermalink->value('query'), 'permalink' => $Qpermalink->value('permalink'), 'image' => $Qcategories->value('categories_image'), 'count' => 0, 'mode' => $Qcategories->value('categories_mode'), 'link_target' => $Qcategories->valueInt('categories_link_target'), 'custom_url' => $Qcategories->value('categories_custom_url'), 'status' => $Qcategories->valueInt('categories_status'), 'nav' => $Qcategories->valueInt('categories_visibility_nav'), 'box' => $Qcategories->valueInt('categories_visibility_box'), 'access_levels' => $Qcategories->value('access_levels'));
         }
         if ($this->_show_total_products === true) {
             $this->_calculateProductTotals();
         }
         if (utility::isB2B() && !isset($_SESSION['admin'])) {
             $catArr = array();
             $gAccess = explode(';', $lC_Customer->getCustomerGroupAccess());
             foreach ($this->_data as $parent_id => $data) {
                 foreach ($data as $categories_id => $cData) {
                     $cAccess = explode(';', $cData['access_levels']);
                     foreach ($gAccess as $key => $gLevel) {
                         if (in_array($gLevel, $cAccess)) {
                             $catArr[$parent_id][$categories_id] = $cData;
                             break;
                         }
                     }
                 }
             }
             $this->_data = $catArr;
         }
         if ($lC_Cache->isEnabled()) {
             $lC_Cache->write($this->_data);
         }
     }
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:53,代码来源:category_tree.php

示例4:

<?php

/**
  @package    catalog::admin::applications
  @author     Loaded Commerce
  @copyright  Copyright 2003-2014 Loaded Commerce, LLC
  @copyright  Portions Copyright 2003 osCommerce
  @copyright  Template built on Developr theme by DisplayInline http://themeforest.net/user/displayinline under Extended license 
  @license    https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt
  @version    $Id: main.php v1.0 2013-08-08 datazen $
*/
require_once $lC_Vqmod->modCheck('includes/applications/orders/classes/orders.php');
require_once $lC_Vqmod->modCheck('includes/applications/manufacturers/classes/manufacturers.php');
if (utility::isPro() == true || utility::isB2B() == true) {
    $note = '';
} else {
    $note = '<p class="message icon-speech orange-gradient">&nbsp;' . $lC_Language->get('text1') . '<span class="upsellinfo" upselltitle="' . $lC_Language->get('text_class_upsell_title') . '" upselldesc="' . $lC_Language->get('text_additional_images_upsell_desc') . '"></span>' . lc_go_pro() . '&nbsp;&nbsp;' . $lC_Language->get('text2') . '<span class="upsellinfo" upselltitle="' . $lC_Language->get('text_class_upsell_title') . '" upselldesc="' . $lC_Language->get('text_class_upsell_desc') . '"></span>' . lc_go_pro() . $lC_Language->get('text3') . '</p>';
}
$breakout = '<span class="breakout-wrapper">
               <span class="anthracite with-small-padding no-wrap" name="breakout_by" id="breakout_by">' . $lC_Language->get("text_breakout_by") . '</span>
               <label class="no-wrap">
                 <input type="radio" class="radio" id="breakout" name="breakout" value = "class">
                 <span class="anthracite with-small-padding space">' . $lC_Language->get("text_class") . '</span>
                 ' . lc_go_pro() . '
               </label>
               <label class="no-wrap">
                 <input type="radio" class="radio" id="breakout" name="breakout" value="supplier">
                 <span class="anthracite with-small-padding">' . $lC_Language->get("text_supplier") . '</span>
                 <span class="upsellinfo" upselltitle="' . $lC_Language->get('text_class_upsell_title') . '" upselldesc="' . $lC_Language->get('text_class_upsell_desc') . '"></span>
                 ' . lc_go_pro() . '
               </label>
开发者ID:rajeshb001,项目名称:itpl_loaded7,代码行数:31,代码来源:main.php

示例5: format

 public function format($number, $currency_code = '', $currency_value = '')
 {
     global $lC_Language;
     if (empty($currency_code) || $this->exists($currency_code) == false) {
         $currency_code = isset($_SESSION['currency']) ? $_SESSION['currency'] : DEFAULT_CURRENCY;
     }
     if (empty($currency_value) || is_numeric($currency_value) == false) {
         $currency_value = $this->currencies[$currency_code]['value'];
     }
     $number_value = number_format(lc_round($number * $currency_value, $this->currencies[$currency_code]['decimal_places']), $this->currencies[$currency_code]['decimal_places'], $lC_Language->getNumericDecimalSeparator(), $lC_Language->getNumericThousandsSeparator());
     // rounding rule
     if ((utility::isPro() === true || utility::isB2B() === true) && defined('PRO_SETTINGS_ROUNDING_RULES') && PRO_SETTINGS_ROUNDING_RULES != '') {
         // determine the current price parts
         $currentPriceValue = lc_round($number * $currency_value, $this->currencies[$currency_code]['decimal_places']);
         $priceParts = explode('.', $currentPriceValue);
         $dollarPrice = $priceParts[0];
         $centsPrice = $priceParts[1];
         // get the rounding rules
         $rules = unserialize(PRO_SETTINGS_ROUNDING_RULES);
         if (is_array($rules[$this->getCode()])) {
             if ($rules[$this->getCode()]['status'] == 'on' || $rules[$this->getCode()]['status'] == '1') {
                 $roundto = $rules[$this->getCode()]['roundto'];
                 $level = $rules[$this->getCode()]['level'];
                 switch ($level) {
                     case '0':
                         // ###.#0
                         $number_value = number_format((double) (substr((string) $number_value, 0, -($level + 1)) . str_replace(array('.', '#'), '', $roundto)), DECIMAL_PLACES);
                         break;
                     case '1':
                         // ###.00
                         $number_value = number_format((double) (substr((string) $number_value, 0, -($level + 1)) . str_replace(array('.', '#'), '', $roundto)), DECIMAL_PLACES);
                         break;
                     case '2':
                         // ##0.00
                         if (strstr($roundto, '.')) {
                             $parts = explode('.', $roundto);
                             $rDollar = (string) $parts[0];
                             $rCents = (string) $parts[1];
                             $number_value = (double) (substr($dollarPrice, 0, -1) . $rDollar . '.' . $rCents);
                         }
                         break;
                     case '3':
                         // #00.00
                         if (strstr($roundto, '.')) {
                             $parts = explode('.', $roundto);
                             $rDollar = (string) $parts[0];
                             $rCents = (string) $parts[1];
                             $number_value = (double) (substr($dollarPrice, 0, -2) . $rDollar . '.' . $rCents);
                         }
                         break;
                     case '4':
                         // 000.00
                         if (strstr($roundto, '.')) {
                             $parts = explode('.', $roundto);
                             $rDollar = (string) $parts[0];
                             $rCents = (string) $parts[1];
                             $number_value = (double) (substr($dollarPrice, 0, -3) . $rDollar . '.' . $rCents);
                         }
                         break;
                 }
             }
         }
     }
     return $this->currencies[$currency_code]['symbol_left'] . $number_value . $this->currencies[$currency_code]['symbol_right'];
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:65,代码来源:currencies.php

示例6: isset

echo $lC_Currencies->getSymbolLeft();
?>
</span>
        <input type="text" onfocus="this.select();" onchange="updatePricingDiscountDisplay();" class="input-unstyled" name="products_base_price" id="products_base_price" value="<?php 
echo isset($pInfo) ? number_format(lc_round($pInfo->get('products_price'), DECIMAL_PLACES), DECIMAL_PLACES) : null;
?>
" class="input strong" onblur="$('#products_price0').val(this.value);" />
      </div>    
      <?php 
echo lc_show_info_bubble($lC_Language->get('info_bubble_pricing_base_price'), null, 'info-spot on-left grey margin-left');
?>
    </div>

    <div class="upsellwrapper field-block field-block-product button-height">
      <?php 
if (utility::isPro() === false || utility::isB2B() === false) {
    ?>
        <label upselltitle="<?php 
    echo $lC_Language->get('text_group_pricing');
    ?>
" upselldesc="<?php 
    echo $lC_Language->get('text_group_pricing_desc');
    ?>
" for="" class="label upsellinfo"><b><?php 
    echo $lC_Language->get('text_group_pricing');
    ?>
</b></label>
      <?php 
}
?>
      <label for="groups_pricing_switch" class="label"><b><?php 
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:31,代码来源:pricing.php

示例7: getProVersionTag

 public static function getProVersionTag()
 {
     global $lC_Language;
     if (utility::isB2B()) {
         return '<small class="tag orange-gradient mid-margin-left mid-margin-right">B2B</small>' . $lC_Language->get('text_version') . ' ' . utility::getB2BVersion();
     } else {
         if (utility::isPro()) {
             return '<small class="tag red-gradient mid-margin-left mid-margin-right">PRO</small>' . $lC_Language->get('text_version') . ' ' . utility::getProVersion();
         }
     }
 }
开发者ID:rajeshb001,项目名称:itpl_loaded7,代码行数:11,代码来源:login.php

示例8: asort

asort($define_list);
$column_list = array();
reset($define_list);
while (list($key, $value) = each($define_list)) {
    if ($value > 0) {
        $column_list[] = $key;
    }
}
if ($Qlisting->numberOfRows() > 0) {
    $output = '';
    $show_price = true;
    $show_buy_now = true;
    while ($Qlisting->next()) {
        // VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW
        $lC_Product = new lC_Product($Qlisting->valueInt('products_id'));
        if (utility::isB2B() && $lC_Customer->isLoggedOn() === false) {
            $access = defined('B2B_SETTINGS_GUEST_CATALOG_ACCESS') && B2B_SETTINGS_GUEST_CATALOG_ACCESS > 0 ? (int) B2B_SETTINGS_GUEST_CATALOG_ACCESS : 0;
            if ($access < 66) {
                $show_price = false;
            }
            if ($access < 99) {
                $show_buy_now = false;
            }
        }
        if (strtotime($lC_Product->getDateAvailable()) <= strtotime(lC_Datetime::getShort())) {
            $output .= '<div class="product-listing-module-items">';
            for ($col = 0, $n = sizeof($column_list); $col < $n; $col++) {
                switch ($column_list[$col]) {
                    case 'PRODUCT_LIST_MODEL':
                        $output .= '<div class="product-listing-module-model">' . $lC_Product->getModel() . '</div>' . "\n";
                        break;
开发者ID:rajeshb001,项目名称:itpl_loaded7,代码行数:31,代码来源:product_listing.php

示例9: getSimpleOptionsPricingTbody

 public static function getSimpleOptionsPricingTbody($options, $customers_group_id)
 {
     global $lC_Currencies, $pInfo;
     if ($customers_group_id == '') {
         return false;
     }
     $gData = lC_Customer_groups_Admin::getData($customers_group_id);
     $baselineDiscount = (double) $gData['baseline_discount'];
     $basePrice = isset($pInfo) ? (double) $pInfo->get('products_price') : 0.0;
     $tbody = '';
     if (isset($options) && !empty($options)) {
         foreach ($options as $key => $so) {
             if (isset($so['title']) && $so['title'] != NULL) {
                 $items = '';
                 if (is_array($so['values'])) {
                     foreach ($so['values'] as $k => $v) {
                         if ($v['options_id'] == $so['options_id'] && $v['products_id'] == $pInfo->get('products_id') && $customers_group_id == $v['customers_group_id']) {
                             //                if ($customers_group_id == DEFAULT_CUSTOMERS_GROUP_ID || (utility::isPro() === true && utility::isB2B() === true)) {
                             $mod = isset($v['price_modifier']) && !empty($v['price_modifier']) ? number_format($v['price_modifier'], DECIMAL_PLACES) : '0.00';
                             //                } else {
                             //                  $mod = number_format(round(($basePrice * $baselineDiscount) * .01, DECIMAL_PLACES), DECIMAL_PLACES);
                             //                }
                             $items .= '<tr class="trp-' . $v['options_id'] . '">' . '  <td class="element">' . $v['title'] . '</td>' . '  <td>' . '    <div id="div_' . $v['customers_group_id'] . '_' . $v['options_id'] . '_' . $v['values_id'] . '" class="icon-plus-round icon-green icon-size2" style="display:inline;">' . '      <div class="inputs' . ($customers_group_id != DEFAULT_CUSTOMERS_GROUP_ID && utility::isB2B() === false ? ' disabled' : '') . '" style="display:inline; padding:8px 0;">' . '        <span class="mid-margin-left no-margin-right">' . $lC_Currencies->getSymbolLeft() . '</span>' . '        <input type="text" class="input-unstyled" onfocus="$(this).select()" value="' . $mod . '" onblur="showSimpleOptionsPricingSymbol(this, \'' . $v['customers_group_id'] . '_' . $v['options_id'] . '_' . $v['values_id'] . '\');" id="simple_options_entry_price_modifier_' . $v['customers_group_id'] . '_' . $v['options_id'] . '_' . $v['values_id'] . '" name="simple_options_entry_price_modifier[' . $v['customers_group_id'] . '][' . $v['options_id'] . '][' . $v['values_id'] . ']" ' . ($customers_group_id != DEFAULT_CUSTOMERS_GROUP_ID && utility::isB2B() === false ? ' DISABLED' : '') . '>' . '      </div>' . '    </div>' . '  </td>' . '</tr>';
                         }
                     }
                 }
                 $tbody .= '<tr id="trp-' . $customers_group_id . '-' . $so['options_id'] . '" class="trp-' . $so['options_id'] . '"><td width="100px" class="strong">' . $so['title'] . '</td></tr>' . $items;
             }
         }
     }
     return $tbody;
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:32,代码来源:products.php

示例10: getPriceInfo

 public function getPriceInfo($product_id, $customers_group_id = 1, $data)
 {
     global $lC_Specials, $lC_Database, $lC_Language, $lC_Customer, $lC_Services, $lC_Currencies, $lC_ShoppingCart, $lC_Tax;
     $quantity = isset($data['quantity']) && $data['quantity'] != null ? (int) $data['quantity'] : 1;
     // #### SET BASE PRICE #### //
     $base_price = $this->getBasePrice($product_id);
     // check for variant
     if (isset($data['variants']) && is_array($data['variants'])) {
         $vpID = (int) self::getProductVariantID($data['variants']);
         if (isset($vpID) && is_numeric($vpID)) {
             $base_price = self::getProductPrice($vpID);
         }
     }
     // added for localization
     if (isset($_SESSION['localization']['base_price_modifier']) && $_SESSION['localization']['base_price_modifier'] > 0) {
         $modified_amt = round($base_price * (double) $_SESSION['localization']['base_price_modifier'] / 100, DECIMAL_PLACES);
         $base_price = $base_price + $modified_amt;
     }
     $price = (double) $base_price;
     // options modifiers
     if (is_array($data['simple_options']) && count($data['simple_options']) > 0) {
         $modTotal = 0;
         foreach ($data['simple_options'] as $options_id => $values_id) {
             $QsimpleOptions = $lC_Database->query("select * from :table_products_simple_options_values where customers_group_id = :customers_group_id and options_id = :options_id and values_id = :values_id and products_id = :products_id limit 1");
             $QsimpleOptions->bindTable(':table_products_simple_options_values', TABLE_PRODUCTS_SIMPLE_OPTIONS_VALUES);
             $QsimpleOptions->bindInt(':customers_group_id', $customers_group_id);
             $QsimpleOptions->bindInt(':products_id', $product_id);
             $QsimpleOptions->bindInt(':options_id', $options_id);
             $QsimpleOptions->bindInt(':values_id', $values_id);
             $QsimpleOptions->setDebug(true);
             $QsimpleOptions->execute();
             $modTotal = (double) $modTotal + $QsimpleOptions->valueDecimal('price_modifier');
             $QsimpleOptions->freeResult();
         }
     }
     // if has special price, base price becomes special price
     $special_price = 0.0;
     if ($lC_Services->isStarted('specials') && $lC_Specials->isActive($product_id)) {
         $special_price = $lC_Specials->getPrice($product_id);
         $price = (double) $special_price < (double) $price ? (double) $special_price : (double) $price;
     }
     // if has qty price breaks, adjust base price to break price
     $qpbText = '';
     if ($this->hasQtyPriceBreaks($product_id, $customers_group_id)) {
         $qpbArr = $this->getQtyPriceBreaks($product_id, $customers_group_id);
         usort($qpbArr, "self::_usortBreakPoint");
         $maxBreak = end($qpbArr);
         $cnt = 0;
         foreach ($qpbArr as $key => $value) {
             if ((int) $value['qty_break'] <= (int) $quantity) {
                 if ($lC_Services->isStarted('specials') && $lC_Specials->isActive($product_id)) {
                     $price = $special_price < (double) $value['price_break'] ? $special_price : (double) $value['price_break'];
                 } else {
                     $price = (double) $value['price_break'];
                 }
                 $cnt = $key;
             }
         }
         if (defined('PRODUCT_PRICING_QPB_FORMAT') && PRODUCT_PRICING_QPB_FORMAT != NULL) {
             switch (PRODUCT_PRICING_QPB_FORMAT) {
                 case 'None':
                     $listing = $lC_Currencies->displayPrice($price, DECIMAL_PLACES);
                     break;
                 case 'Starts At':
                     $listing = '<div class="margin-top-neg"><span class="lt-blue">' . $lC_Language->get('pricing_starts_at') . '</span><p class="lead small-margin-bottom small-margin-top-neg">' . $lC_Currencies->displayPrice($this->getBasePrice(), $this->getTaxClassID()) . '</p></div>';
                     break;
                 case 'Low As':
                     $listing = '<div class="margin-top-neg"><span class="lt-blue">' . $lC_Language->get('pricing_low_as') . '</span><p class="lead small-margin-bottom small-margin-top-neg">' . $lC_Currencies->displayPrice($maxBreak['price_break'] < $price ? $maxBreak['price_break'] : $price, $this->getTaxClassID()) . '</p></div>';
                     break;
                 default:
                     $listing = $lC_Currencies->displayPrice($maxBreak['price_break'] < $price ? $maxBreak['price_break'] : $price, $this->getTaxClassID()) . ' - ' . $lC_Currencies->displayPrice($price, $this->getTaxClassID());
             }
         }
         // if has special and qpb determine the next break point based off special price and adjust $cnt
         if ($special_price != 0.0) {
             $cnt = 0;
             usort($qpbArr, "self::_usortBreakPoint");
             foreach ($qpbArr as $key => $value) {
                 if ((int) $value['price_break'] < $special_price) {
                     $cnt = $key;
                     break;
                 }
             }
         } else {
             if ($quantity > 1 && $quantity >= $qpbArr[$cnt]['qty_break']) {
                 $cnt++;
             }
         }
         $youSave = (int) $quantity == 1 ? round((1 - (double) $qpbArr[$cnt]['price_break'] / (double) $this->getBasePrice()) * 100, DECIMAL_PLACES) : ((int) $quantity >= (int) $maxBreak['qty_break'] ? round((1 - (double) $maxBreak['price_break'] / (double) $this->getBasePrice()) * 100, DECIMAL_PLACES) : round((1 - (double) $qpbArr[$cnt]['price_break'] / (double) $this->getBasePrice()) * 100, DECIMAL_PLACES));
         $qpbData = array('nextBreak' => (int) $quantity == 1 ? (int) $qpbArr[$cnt]['qty_break'] : ($quantity >= (int) $maxBreak['qty_break'] ? $maxBreak['qty_break'] : $qpbArr[$cnt]['qty_break']), 'nextPrice' => (int) $quantity == 1 ? number_format($qpbArr[$cnt]['price_break'] + $modTotal, DECIMAL_PLACES) : ((int) $quantity >= $maxBreak['qty_break'] ? number_format($maxBreak['price_break'] + $modTotal, DECIMAL_PLACES) : number_format($qpbArr[$cnt]['price_break'] + $modTotal, DECIMAL_PLACES)), 'youSave' => number_format($youSave, 0) . '%', 'listing' => $listing);
     }
     $price = $price + $modTotal;
     // overrides
     if (utility::isB2B() && $_GET['action'] != 'cart_add') {
         if (defined('B2B_SETTINGS_SHOW_GUEST_ONLY_MSRP') && B2B_SETTINGS_SHOW_GUEST_ONLY_MSRP == '1' && $lC_Customer->isLoggedOn() === false) {
             $price = $this->getMSRP();
         }
         if (defined('B2B_SETTINGS_SHOW_RETAIL_ONLY_MSRP') && B2B_SETTINGS_SHOW_RETAIL_ONLY_MSRP == '1' && $lC_Customer->isLoggedOn() === true && $lC_Customer->getCustomerGroup() == DEFAULT_CUSTOMERS_GROUP_ID) {
             $price = $this->getMSRP();
         }
//.........这里部分代码省略.........
开发者ID:rajeshb001,项目名称:itpl_loaded7,代码行数:101,代码来源:product.php

示例11: on

 function &execute($max_entries = MAX_DISPLAY_SEARCH_RESULTS)
 {
     global $lC_Database, $lC_Language, $lC_CategoryTree, $lC_Image, $lC_Customer;
     $sqlQuery = 'select SQL_CALC_FOUND_ROWS distinct p.products_id from :table_products p left join :table_product_attributes pa on (p.products_id = pa.products_id) left join :table_templates_boxes tb on (pa.id = tb.id and tb.code = "manufacturers"), :table_products_description pd';
     if ($this->hasCategory()) {
         $sqlQuery .= ' , :table_categories c, :table_products_to_categories p2c';
     }
     $sqlQuery .= ' where p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id';
     if ($this->hasCategory()) {
         $sqlQuery .= ' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id';
     }
     $Qlisting = $lC_Database->query($sqlQuery);
     $Qlisting->bindTable(':table_products', TABLE_PRODUCTS);
     $Qlisting->bindTable(':table_templates_boxes', TABLE_TEMPLATES_BOXES);
     $Qlisting->bindTable(':table_product_attributes', TABLE_PRODUCT_ATTRIBUTES);
     $Qlisting->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
     if ($this->hasCategory()) {
         $Qlisting->bindTable(':table_categories', TABLE_CATEGORIES);
     }
     if ($this->hasCategory()) {
         $Qlisting->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES);
     }
     $Qlisting->bindInt(':default_flag', 1);
     $Qlisting->bindInt(':language_id', $lC_Language->getID());
     if ($this->hasCategory()) {
         if ($this->isRecursive()) {
             $subcategories_array = array($this->_category);
             $Qlisting->appendQuery('and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and p2c.categories_id in (:categories_id)');
             $Qlisting->bindRaw(':categories_id', implode(',', $lC_CategoryTree->getChildren($this->_category, $subcategories_array)));
         } else {
             $Qlisting->appendQuery('and p2c.products_id = p.products_id and p2c.products_id = pd.products_id and pd.language_id = :language_id and p2c.categories_id = :categories_id');
             $Qlisting->bindInt(':language_id', $lC_Language->getID());
             $Qlisting->bindInt(':categories_id', $this->_category);
         }
     }
     if ($this->hasManufacturer()) {
         $Qlisting->appendQuery('and pa.id = tb.id and pa.value = :manufacturers_id');
         $Qlisting->bindInt(':manufacturers_id', $this->_manufacturer);
     }
     if (utility::isB2B()) {
         $chkSQL = $Qlisting->getQuery();
         $Qchk = $lC_Database->query($chkSQL);
         $Qchk->execute();
         $rows_before = $Qchk->numberOfRows();
         $Qchk->freeResult();
         $Qlisting->appendQuery($lC_Customer->getCustomerGroupAccessSql());
         $rows_after = $Qlisting->numberOfRows();
         $_SESSION['has_hidden_products'] = $rows_before != $rows_after ? true : false;
     }
     $Qlisting->appendQuery('order by');
     if (isset($this->_sort_by)) {
         $Qlisting->appendQuery(':order_by :order_by_direction');
         $Qlisting->bindRaw(':order_by', $this->_sort_by);
         $Qlisting->bindRaw(':order_by_direction', $this->_sort_by_direction == '-' ? 'desc' : '');
     } else {
         $Qlisting->appendQuery('pd.products_name :order_by_direction');
         $Qlisting->bindRaw(':order_by_direction', $this->_sort_by_direction == '-' ? 'desc' : '');
     }
     $Qlisting->setBatchLimit(isset($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 1, $max_entries);
     $Qlisting->execute();
     return $Qlisting;
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:62,代码来源:products.php

示例12: toggleSecurityInfo

}

function toggleSecurityInfo() {
  var open = $('.security-info-text-container').is(':visible');
  if (!open) {
    $('.security-info-text-container').slideDown();
    $('#arrow').removeClass('arrow-down').addClass('arrow-up');
  } else {
    $('.security-info-text-container').slideUp();
    $('#arrow').removeClass('arrow-up').addClass('arrow-down');
  }  
}

$("input:radio[name=payment_method]").click(function() {
  var isB2B = '<?php 
echo utility::isB2B() === true ? 1 : 0;
?>
';  
  if (isB2B == 1) { 
    processTermsSelect();
  }  
});

function processTermsSelect() {
  var selectedPayMethod = $("input:radio[name=payment_method]:checked").val();
  var selectedPayTermID = $('#payment_terms :selected').val();
  
  // adjust payment terms selection array  
  updatePaymentTermsSelectHtml(selectedPayMethod, selectedPayTermID);  
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:30,代码来源:payment.js.php

示例13: lc_href_link_admin

  @package    catalog::admin::templates
  @author     Loaded Commerce
  @copyright  Copyright 2003-2014 Loaded Commerce, LLC
  @copyright  Portions Copyright 2003 osCommerce
  @copyright  Template built on Developr theme by DisplayInline http://themeforest.net/user/displayinline under Extended license 
  @license    https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt
  @version    $Id: header.php v1.0 2013-08-08 datazen $
*/
?>
<!-- Title bar -->
<header role="banner" id="title-bar">
  <div class="relative">
    <a id="logoRef" style="" href="<?php 
echo lc_href_link_admin(FILENAME_DEFAULT);
?>
"><img id="logoImg" src="./templates/default/img/logo.png" border="0"></a>
    <?php 
if (utility::isB2B() === true) {
    echo '<span style="vertical-align:50%;"><span class="tag orange-gradient glossy" style="padding-top:2px; font-size:1.0em;">B2B</span></span>';
} else {
    if (utility::isPro() === true) {
        echo '<span style="vertical-align:50%;"><span class="tag red-gradient glossy" style="padding-top:2px; font-size:1.0em;">PRO</span></span>';
    }
}
?>
  </div>
</header>
<?php 
if ($lC_MessageStack->size('header') > 0) {
    echo $lC_MessageStack->get('header');
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:31,代码来源:header.php


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