• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP oos_get_tax_rate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: process

    function process() {
      global $oOrder, $oCurrencies;

      if (MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE == '1') {
        switch (MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION) {
          case 'national':
            if ($oOrder->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
          case 'international':
            if ($oOrder->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
          case 'both':
            $pass = true; break;
          default:
            $pass = false; break;
        }

        if ( ($pass == true) && ( ($oOrder->info['total'] - $oOrder->info['shipping_cost']) < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) ) {
          $tax = oos_get_tax_rate(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS, $oOrder->billing['country']['id'], $oOrder->billing['zone_id']);
          // $tax_description = oos_get_tax_description(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS, $oOrder->delivery['country']['id'], $oOrder->delivery['zone_id']);
          $tax_description = oos_get_tax_rate(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS, $oOrder->billing['country']['id'], $oOrder->billing['zone_id']);

          $oOrder->info['tax'] += oos_calculate_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax);
          $oOrder->info['tax_groups']["$tax_description"] += oos_calculate_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax);
          $oOrder->info['total'] += MODULE_ORDER_TOTAL_LOWORDERFEE_FEE + oos_calculate_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax);

          $this->output[] = array('title' => $this->title . ':',
                                  'text' => $oCurrencies->format(oos_add_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax), true, $oOrder->info['currency'], $oOrder->info['currency_value']),
                                  'value' => oos_add_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax));
        }
      }
    }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:30,代码来源:ot_loworderfee.php


示例2: quote

 function quote($method = '')
 {
     global $oOrder, $aLang, $shipping_weight, $shipping_num_boxes;
     if (MODULE_SHIPPING_TABLE_MODE == 'price') {
         $oOrder_total = $_SESSION['cart']->show_total();
     } else {
         $oOrder_total = $shipping_weight;
     }
     $table_cost = split("[:,]", MODULE_SHIPPING_TABLE_COST);
     $size = count($table_cost);
     for ($i = 0, $n = $size; $i < $n; $i += 2) {
         if ($oOrder_total <= $table_cost[$i]) {
             $shipping = $table_cost[$i + 1];
             break;
         }
     }
     if (MODULE_SHIPPING_TABLE_MODE == 'weight') {
         $shipping = $shipping * $shipping_num_boxes;
     }
     $this->quotes = array('id' => $this->code, 'module' => $aLang['module_shipping_table_text_title'], 'methods' => array(array('id' => $this->code, 'title' => $aLang['module_shipping_table_text_way'], 'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = oos_get_tax_rate($this->tax_class, $oOrder->delivery['country']['id'], $oOrder->delivery['zone_id']);
     }
     if (oos_is_not_null($this->icon)) {
         $this->quotes['icon'] = oos_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:28,代码来源:table.php


示例3: quote

 function quote($method = '')
 {
     global $aLang, $oOrder;
     $this->quotes = array('id' => $this->code, 'module' => $aLang['module_shipping_hermes_text_title'], 'methods' => array(array('id' => $this->code, 'title' => $aLang['module_shipping_hermes_text_way'], 'cost' => MODULE_SHIPPING_HERMES_COST)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = oos_get_tax_rate($this->tax_class, $oOrder->delivery['country']['id'], $oOrder->delivery['zone_id']);
     }
     if (!empty($this->icon)) {
         $this->quotes['icon'] = oos_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:12,代码来源:hermes.php


示例4: quote

 function quote($method = '')
 {
     global $aLang, $oOrder;
     $this->quotes = array('id' => $this->code, 'module' => $aLang['module_shipping_certified_mail_text_title'], 'methods' => array(array('id' => $this->code, 'title' => $aLang['module_shipping_certified_mail_text_way'], 'cost' => MODULE_SHIPPING_CERTIFIED_MAIL_COST)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = oos_get_tax_rate($this->tax_class, $oOrder->delivery['country']['id'], $oOrder->delivery['zone_id']);
     }
     if (oos_is_not_null($this->icon)) {
         $this->quotes['icon'] = oos_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:12,代码来源:certifiedmail.php


示例5: quote

 function quote($method = '')
 {
     global $oOrder, $aLang, $total_count;
     $this->quotes = array('id' => $this->code, 'module' => $aLang['module_shipping_item_text_title'], 'methods' => array(array('id' => $this->code, 'title' => $aLang['module_shipping_item_text_way'], 'cost' => MODULE_SHIPPING_ITEM_COST * $total_count + MODULE_SHIPPING_ITEM_HANDLING)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = oos_get_tax_rate($this->tax_class, $oOrder->delivery['country']['id'], $oOrder->delivery['zone_id']);
     }
     if (oos_is_not_null($this->icon)) {
         $this->quotes['icon'] = oos_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:12,代码来源:item.php


示例6: process

 function process()
 {
     global $oOrder, $oCurrencies;
     if (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == '1') {
         switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
             case 'national':
                 if ($oOrder->delivery['country_id'] == STORE_COUNTRY) {
                     $pass = true;
                 }
                 break;
             case 'international':
                 if ($oOrder->delivery['country_id'] != STORE_COUNTRY) {
                     $pass = true;
                 }
                 break;
             case 'both':
                 $pass = true;
                 break;
             default:
                 $pass = false;
                 break;
         }
         if ($pass == true && $oOrder->info['total'] - $oOrder->info['shipping_cost'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) {
             $oOrder->info['shipping_method'] = $this->title;
             $oOrder->info['total'] -= $oOrder->info['shipping_cost'];
             $oOrder->info['shipping_cost'] = 0;
         }
     }
     $module = substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_'));
     if (oos_is_not_null($oOrder->info['shipping_method'])) {
         if ($GLOBALS[$module]->tax_class > 0) {
             $shipping_tax = oos_get_tax_rate($GLOBALS[$module]->tax_class, $oOrder->billing['country']['id'], $oOrder->billing['zone_id']);
             $shipping_tax_description = oos_get_tax_rate($GLOBALS[$module]->tax_class, $oOrder->billing['country']['id'], $oOrder->billing['zone_id']);
             $tax = oos_calculate_tax($oOrder->info['shipping_cost'], $shipping_tax);
             if ($_SESSION['member']->group['show_price_tax'] == 1) {
                 $oOrder->info['shipping_cost'] += $tax;
             }
             $oOrder->info['tax'] += $tax;
             $oOrder->info['tax_groups']["{$shipping_tax_description}"] += $tax;
             $oOrder->info['total'] += $tax;
         }
         $this->output[] = array('title' => $oOrder->info['shipping_method'] . ':', 'text' => $oCurrencies->format($oOrder->info['shipping_cost'], true, $oOrder->info['currency'], $oOrder->info['currency_value']), 'value' => $oOrder->info['shipping_cost']);
     }
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:44,代码来源:ot_shipping.php


示例7: quote

 function quote($method = '')
 {
     global $oOrder, $aLang, $shipping_weight;
     $weight_cost = preg_split("/[:,]/", MODULE_SHIPPING_WEIGHT_COST);
     if ($shipping_weight > $weight_cost[count($weight_cost) - 2]) {
         $shipping = ($shipping_weight - $weight_cost[count($weight_cost) - 2]) * MODULE_SHIPPING_WEIGHT_STEP + $weight_cost[count($weight_cost) - 1];
     }
     for ($i = 0; $i < count($weight_cost); $i += 2) {
         if ($shipping_weight <= $weight_cost[$i]) {
             $shipping = $weight_cost[$i + 1];
             break;
         }
     }
     $this->quotes = array('id' => $this->code, 'module' => $aLang['module_shipping_weight_text_title'], 'methods' => array(array('id' => $this->code, 'title' => $aLang['module_shipping_weight_text_way'], 'cost' => $shipping + MODULE_SHIPPING_WEIGHT_HANDLING)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = oos_get_tax_rate($this->tax_class, $oOrder->delivery['country']['id'], $oOrder->delivery['zone_id']);
     }
     if (!empty($this->icon)) {
         $this->quotes['icon'] = oos_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:22,代码来源:weight.php


示例8: array

                default:
                    $options .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td class="main">' . "\n";
                    $selected = 0;
                    $products_options_array = array();
                    $products_attributestable = $oostable['products_attributes'];
                    $products_options_valuestable = $oostable['products_options_values'];
                    $products_options_sql = "SELECT pov.products_options_values_id, pov.products_options_values_name,\n                                                  pa.options_values_price, pa.price_prefix, pa.options_sort_order\n                                           FROM {$products_attributestable} pa,\n                                                {$products_options_valuestable} pov\n                                           WHERE pa.products_id = '" . intval($nProductsId) . "'\n                                             AND pa.options_id = '" . $products_options_name['products_options_id'] . "'\n                                             AND pa.options_values_id = pov.products_options_values_id\n                                             AND pov.products_options_values_languages_id = '" . intval($nLanguageID) . "'\n                                          " . $options_sort_by;
                    $products_options_result = $dbconn->Execute($products_options_sql);
                    while ($products_options = $products_options_result->fields) {
                        $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
                        if ($products_options['options_values_price'] > '0') {
                            if ($_SESSION['member']->group['show_price'] == 1) {
                                if ($info_product_discount != 0) {
                                    $products_options_array[count($products_options_array) - 1]['text'] .= ' (' . $products_options['price_prefix'] . $oCurrencies->display_price($products_options['options_values_price'], oos_get_tax_rate($product_info['products_tax_class_id'])) . ' -' . number_format($info_product_discount, 2) . '% )&nbsp';
                                } else {
                                    $products_options_array[count($products_options_array) - 1]['text'] .= ' (' . $products_options['price_prefix'] . $oCurrencies->display_price($products_options['options_values_price'], oos_get_tax_rate($product_info['products_tax_class_id'])) . ')&nbsp';
                                }
                            }
                        }
                        // Move that ADOdb pointer!
                        $products_options_result->MoveNext();
                    }
                    $options .= oos_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $_SESSION['cart']->contents[$sProductsId]['attributes'][$products_options_name['products_options_id']]);
                    $options .= '</td></tr>';
            }
            // Move that ADOdb pointer!
            $products_options_name_result->MoveNext();
        }
        $options .= '</table>';
    }
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:products_options.php


示例9: quote

 function quote($method = '')
 {
     global $oOrder, $aLang, $shipping_weight, $shipping_num_boxes;
     $dest_country = $oOrder->delivery['country']['iso_code_2'];
     $dest_zone = 0;
     $error = false;
     for ($j = 1; $j <= $this->num_fedexeu; $j++) {
         $countries_table = constant('MODULE_SHIPPING_FEDEXEU_COUNTRIES_' . $j);
         $country_zones = split("[,]", $countries_table);
         if (in_array($dest_country, $country_zones)) {
             $dest_zone = $j;
             break;
         }
     }
     if ($dest_zone == 0) {
         $error = true;
     } else {
         $shipping = -1;
         $fedexeu_cost_pak = @constant('MODULE_SHIPPING_FEDEXEU_COST_PAK_' . $j);
         $fedexeu_cost_box = @constant('MODULE_SHIPPING_FEDEXEU_COST_BOX_' . $j);
         $methods = array();
         if ($fedexeu_cost_pak != '') {
             $fedexeu_table_pak = split("[:,]", $fedexeu_cost_pak);
             for ($i = 0; $i < count($fedexeu_table_pak); $i += 2) {
                 if ($shipping_weight <= $fedexeu_table_pak[$i]) {
                     $shipping_pak = $fedexeu_table_pak[$i + 1];
                     break;
                 }
             }
             if ($shipping_pak == -1) {
                 $shipping_cost = 0;
                 $shipping_method = $aLang['module_shipping_fedexeu_undefined_rate'];
             } else {
                 $shipping_cost_1 = $shipping_pak + MODULE_SHIPPING_FEDEXEU_HANDLING;
             }
             if ($shipping_pak != 0) {
                 $methods[] = array('id' => 'PAK', 'title' => 'FedEx Pak', 'cost' => (MODULE_SHIPPING_FEDEXEU_HANDLING + $shipping_cost_1) * $shipping_num_boxes);
             }
         }
         if ($fedexeu_cost_box != '') {
             $fedexeu_table_box = split("[:,]", $fedexeu_cost_box);
             if ($shipping_weight > 10 and $shipping_weight <= 20) {
                 $shipping_box = number_format(($shipping_weight - 10) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_FEDEXEU_SOOS_BOX_20_' . $j) + $fedexeu_table_box[count($fedexeu_table_box) - 1];
             } elseif ($shipping_weight > 20 and $shipping_weight <= 40) {
                 $shipping_box = number_format(($shipping_weight - 20) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_FEDEXEU_SOOS_BOX_40_' . $j) + 20 * constant('MODULE_SHIPPING_FEDEXEU_SOOS_BOX_20_' . $j) + $fedexeu_table_box[count($fedexeu_table_box) - 1];
             } elseif ($shipping_weight > 40 and $shipping_weight <= 70) {
                 $shipping_box = number_format(($shipping_weight - 40) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_FEDEXEU_SOOS_BOX_70_' . $j) + 20 * constant('MODULE_SHIPPING_FEDEXEU_SOOS_BOX_20_' . $j) + 40 * constant('MODULE_SHIPPING_FEDEXEU_SOOS_BOX_40_' . $j) + $fedexeu_table_box[count($fedexeu_table_box) - 1];
             } else {
                 for ($i = 0; $i < count($fedexeu_table_box); $i += 2) {
                     if ($shipping_weight <= $fedexeu_table_box[$i]) {
                         $shipping_box = $fedexeu_table_box[$i + 1];
                         break;
                     }
                 }
             }
             if ($shipping_box == -1) {
                 $shipping_cost = 0;
                 $shipping_method = $aLang['module_shipping_fedexeu_undefined_rate'];
             } else {
                 $shipping_cost_2 = $shipping_box + MODULE_SHIPPING_FEDEXEU_HANDLING;
             }
             if ($shipping_box != 0) {
                 $methods[] = array('id' => 'BOX', 'title' => 'FedEx Box', 'cost' => (MODULE_SHIPPING_FEDEXEU_HANDLING + $shipping_cost_2) * $shipping_num_boxes);
             }
         }
     }
     $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . ' ' . $aLang['module_shipping_fedexeu_text_units'] . ')');
     $this->quotes['methods'] = $methods;
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = oos_get_tax_rate($this->tax_class, $oOrder->delivery['country']['id'], $oOrder->delivery['zone_id']);
     }
     if (oos_is_not_null($this->icon)) {
         $this->quotes['icon'] = oos_image($this->icon, $this->title);
     }
     if ($error == true) {
         $this->quotes['error'] = $aLang['module_shipping_fedexeu_invalid_zone'];
     }
     if (oos_is_not_null($method) && isset($this->types[$method])) {
         for ($i = 0; $i < count($methods); $i++) {
             if ($method == $methods[$i]['id']) {
                 $methodsc = array();
                 $methodsc[] = array('id' => $methods[$i]['id'], 'title' => $methods[$i]['title'], 'cost' => $methods[$i]['cost']);
                 break;
             }
         }
         $this->quotes['methods'] = $methodsc;
     }
     return $this->quotes;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:89,代码来源:fedexeu.php


示例10: get_order_total

 function get_order_total()
 {
     global $oOrder;
     $order_total = $oOrder->info['total'];
     // Check if gift voucher is in cart and adjust total
     $products = $_SESSION['cart']->get_products();
     for ($i = 0; $i < count($products); $i++) {
         $t_prid = oos_get_product_id($products[$i]['id']);
         // Get database information
         $dbconn =& oosDBGetConn();
         $oostable =& oosDBGetTables();
         $productstable = $oostable['products'];
         $query = "SELECT products_price, products_tax_class_id, products_model\n                FROM {$productstable}\n                WHERE products_id = '" . intval($t_prid) . "'";
         $gv_result = $dbconn->GetRow($query);
         if (ereg('^GIFT', addslashes($gv_result['products_model']))) {
             $qty = $_SESSION['cart']->get_quantity($t_prid);
             $products_tax = oos_get_tax_rate($gv_result['products_tax_class_id']);
             if ($this->include_tax == '0') {
                 $gv_amount = $gv_result['products_price'] * $qty;
             } else {
                 $gv_amount = ($gv_result['products_price'] + oos_calculate_tax($gv_result['products_price'], $products_tax)) * $qty;
             }
             $order_total = $order_total - $gv_amount;
         }
     }
     if ($this->include_tax == '0') {
         $order_total = $order_total - $oOrder->info['tax'];
     }
     if ($this->include_shipping == '0') {
         $order_total = $order_total - $oOrder->info['shipping_cost'];
     }
     return $order_total;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:33,代码来源:ot_cmembers.php


示例11: oos_get_tax_rate

        if (!empty($featured_special_price)) {
            $featured_product_special_price = $oCurrencies->display_price($featured_special_price, oos_get_tax_rate($featured['products_tax_class_id']));
        } else {
            $featured_max_product_discount = min($featured['products_discount_allowed'],$_SESSION['member']->group['discount']);
            if ($featured_max_product_discount != 0 ) {
                $featured_special_price = $featured['products_price']*(100-$featured_max_product_discount)/100;
                $featured_product_discount_price = $oCurrencies->display_price($featured_special_price, oos_get_tax_rate($featured['products_tax_class_id']));
            }
        }

        if ($featured['products_base_price'] != 1) {
            $featured_base_product_price = $oCurrencies->display_price($featured['products_price'] * $featured['products_base_price'], oos_get_tax_rate($featured['products_tax_class_id']));

            if ($featured_special_price != '') {
                $featured_base_product_special_price = $oCurrencies->display_price($featured_special_price * $featured['products_base_price'], oos_get_tax_rate($featured['products_tax_class_id']));
            }
        }

        $aFeatured[] = array('products_id' => $featured['products_id'],
                             'products_image' => $featured['products_image'],
                             'products_name' => $featured['products_name'],
                             'products_description' => oos_remove_tags($featured['products_description']),
                             'products_base_price' => $featured['products_base_price'],
                             'products_base_unit' => $featured['products_base_unit'],
                             'products_units' => $featured_units,
                             'featured_product_price' => $featured_product_price,
                             'featured_product_special_price' => $featured_product_special_price,
                             'featured_max_product_discount' => $featured_max_product_discount,
                             'featured_product_discount_price' => $featured_product_discount_price,
                             'featured_base_product_price' => $featured_base_product_price,
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:30,代码来源:featured.php


示例12: oos_get_tax_rate

            $pl_product_special_price = $oCurrencies->display_price($pl_special_price, oos_get_tax_rate($listing['products_tax_class_id']));
        } else {
            $pl_max_product_discount =  min($listing['products_discount_allowed'],$_SESSION['member']->group['discount']);

            if ($pl_max_product_discount != 0 ) {
                $pl_special_price = $listing['products_price']*(100-$pl_max_product_discount)/100;
                $pl_product_special_price = $oCurrencies->display_price($pl_special_price, oos_get_tax_rate($listing['products_tax_class_id']));
            }
        }


        if ($listing['products_base_price'] != 1) {
            $pl_base_product_price = $oCurrencies->display_price($listing['products_price'] * $listing['products_base_price'], oos_get_tax_rate($listing['products_tax_class_id']));

            if ($pl_special_price != '') {
                $pl_base_product_special_price = $oCurrencies->display_price($pl_special_price * $listing['products_base_price'], oos_get_tax_rate($listing['products_tax_class_id']));
            }
        }

        if (!empty($listing['specials_new_products_price'])) {
            $sProductListPrice = '&nbsp;<s>' . $pl_product_price . $sUnits . '</s><br />';
            if ($listing['products_base_price'] != 1)  $lc_text .= '<s><span class="base_price">' . $listing['products_base_unit'] . ' = ' . $pl_base_product_price . '</span></s><br />';

            $sProductListPrice .= '&nbsp;<span class="special_price">' . $pl_product_special_price . $sUnits . '</span>';
            if ($listing['products_base_price'] != 1)  $lc_text .= '<br /><span class="special_base_price">' . $listing['products_base_unit'] . ' = ' . $pl_base_product_special_price . '</span></s><br />';
        } else {
            if ($pl_max_product_discount != 0 ) {
                $sProductListPrice = '&nbsp;<s>' . $pl_product_price . $sUnits . '</s>&nbsp;-' . number_format($pl_max_product_discount, 2) . '%<br />';
                $sProductListPrice .= '&nbsp;<span class="discount_price">' . $pl_product_special_price . $sUnits . '</span>';
                if ($listing['products_base_price'] != 1)  $lc_text .= '<br /><span class="special_base_price">' . $listing['products_base_unit'] . ' = ' . $pl_base_product_special_price . '</span></s><br />';
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:30,代码来源:slavery_listing.php


示例13: quote

 function quote($method = '')
 {
     global $oOrder, $aLang, $shipping_weight, $shipping_num_boxes;
     if (!empty($method) && (isset($this->types[$method]) || in_array($method, $this->intl_types))) {
         $this->_setService($method);
     }
     $this->_setMachinable('0');
     $this->_setContainer('None');
     $this->_setSize('REGULAR');
     // usps doesnt accept zero weight
     $shipping_weight = $shipping_weight < 0.1 ? 0.1 : $shipping_weight;
     $shipping_pounds = floor($shipping_weight);
     $shipping_ounces = round(16 * ($shipping_weight - floor($shipping_weight)));
     $this->_setWeight($shipping_pounds, $shipping_ounces);
     $uspsQuote = $this->_getQuote();
     if (is_array($uspsQuote)) {
         if (isset($uspsQuote['error'])) {
             $this->quotes = array('module' => $this->title, 'error' => $uspsQuote['error']);
         } else {
             $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs)');
             $methods = array();
             $size = count($uspsQuote);
             for ($i = 0; $i < $size; $i++) {
                 list($type, $cost) = each($uspsQuote[$i]);
                 $methods[] = array('id' => $type, 'title' => isset($this->types[$type]) ? $this->types[$type] : $type, 'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
             }
             $this->quotes['methods'] = $methods;
             if ($this->tax_class > 0) {
                 $this->quotes['tax'] = oos_get_tax_rate($this->tax_class, $oOrder->delivery['country']['id'], $oOrder->delivery['zone_id']);
             }
         }
     } else {
         $this->quotes = array('module' => $this->title, 'error' => $aLang['module_shipping_usps_text_error']);
     }
     if (!empty($this->icon)) {
         $this->quotes['icon'] = oos_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:39,代码来源:usps.php


示例14: extract

         extract($row, EXTR_PREFIX_ALL, "opt");
         $AddedOptionsPrice += $opt_options_values_price;
         $option_value_details[$option_id][$option_value_id] = array("options_values_price" => $opt_options_values_price);
         $option_names[$option_id] = $opt_products_options_name;
         $option_values_names[$option_value_id] = $opt_products_options_values_name;
     }
 }
 // Get Product Info
 $InfoQuery = "select p.products_model,p.products_price,pd.products_name,p.products_tax_class_id from " . $oostable['products'] . " p left join " . $oostable['products_description'] . " pd on pd.products_id=p.products_id WHERE p.products_id='{$add_product_products_id}'";
 $result = $dbconn->Execute($InfoQuery);
 $row = $result->fields;
 extract($row, EXTR_PREFIX_ALL, "p");
 // Following functions are defined at the bottom of this file
 $CountryID = oos_get_country_id($order->delivery["country"]);
 $ZoneID = oos_get_zone_id($CountryID, $order->delivery["state"]);
 $ProductsTax = oos_get_tax_rate($p_products_tax_class_id, $CountryID, $ZoneID);
 $Query = "insert into " . $oostable['orders_products'] . " set\n        orders_id = {$oID},\n        products_id = {$add_product_products_id},\n        products_model = '{$p_products_model}',\n        products_name = '" . str_replace("'", "&#39;", $p_products_name) . "',\n        products_price = '{$p_products_price}',\n        final_price = '" . ($p_products_price + $AddedOptionsPrice) . "',\n        products_tax = '{$ProductsTax}',\n        products_quantity = {$add_product_quantity};";
 $dbconn->Execute($Query);
 $new_product_id = $dbconn->Insert_ID();
 //UPDATE_INVENTORY_QUANTITY_START
 $dbconn->Execute("UPDATE " . $oostable['products'] . " SET products_quantity = products_quantity - " . $add_product_quantity . ", products_ordered = products_ordered + " . $add_product_quantity . " WHERE products_id = '" . $add_product_products_id . "'");
 //UPDATE_INVENTORY_QUANTITY_END
 if (isset($add_product_options)) {
     foreach ($add_product_options as $option_id => $option_value_id) {
         $Query = "insert into " . $oostable['orders_products_attributes'] . " set\n            orders_id = {$oID},\n            orders_products_id = {$new_product_id},\n            products_options = '" . $option_names[$option_id] . "',\n            products_options_values = '" . $option_values_names[$option_value_id] . "',\n            options_values_price = '" . $option_value_details[$option_id][$option_value_id]["options_values_price"] . "',\n            price_prefix = '+';";
         $dbconn->Execute($Query);
     }
 }
 // Calculate Tax and Sub-Totals
 $order = new order($oID);
 $RunningSubTotal = 0;
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:edit_orders.php


示例15: oos_get_tax_rate

     $reviews_total = $reviews->fields['total'];
     $oSmarty->assign('reviews_total', $reviews_total);
 }
 $discounts_price = '0';
 if (oos_empty($info_special_price) && ($product_info['products_discount4_qty'] > 0 || $product_info['products_discount3_qty'] > 0 || $product_info['products_discount2_qty'] > 0 || $product_info['products_discount1_qty'] > 0)) {
     if ($_SESSION['member']->group['show_price'] == 1 && $_SESSION['member']->group['qty_discounts'] == 1) {
         $discounts_price = '1';
         require 'includes/modules/discounts_price.php';
         if ($product_info['products_discount4'] > 0) {
             $price_discount = $oCurrencies->display_price($product_info['products_discount4'], oos_get_tax_rate($product_info['products_tax_class_id']));
         } elseif ($product_info['products_discount3'] > 0) {
             $price_discount = $oCurrencies->display_price($product_info['products_discount3'], oos_get_tax_rate($product_info['products_tax_class_id']));
         } elseif ($product_info['products_discount2'] > 0) {
             $price_discount = $oCurrencies->display_price($product_info['products_discount2'], oos_get_tax_rate($product_info['products_tax_class_id']));
         } elseif ($product_info['products_discount1'] > 0) {
             $price_discount = $oCurrencies->display_price($product_info['products_discount1'], oos_get_tax_rate($product_info['products_tax_class_id']));
         }
         if (isset($price_discount)) {
             $oSmarty->assign('price_discount', $price_discount);
         }
     }
 }
 require 'includes/modules/products_options.php';
 // assign Smarty variables;
 $oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'discounts_price' => $discounts_price));
 if (!isset($block_get_parameters)) {
     $block_get_parameters = oos_get_all_get_parameters(array('action'));
     $block_get_parameters = oos_remove_trailing($block_get_parameters);
     $oSmarty->assign('get_params', $block_get_parameters);
 }
 $oSmarty->assign('product_info', $product_info);
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:product_info.php


示例16: number_format

            }
        }
    }
    // Tax (not in shopping cart, tax rate may be unknown)
    if ($sPage != $aPages['shopping_cart']) {
        $shopping_cart_detail .= '    <td align="center" valign="top" class="main">' . number_format($products[$i]['tax'], TAX_DECIMAL_PLACES) . '%</td>' . "\n";
    }
    // Product price
    if ($sPage != $aPages['account_history_info']) {
        $shopping_cart_detail .= '    <td align="right" valign="top" class="main"><b>' . $oCurrencies->display_price($products[$i]['price'], oos_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>';
    } else {
        $shopping_cart_detail .= '    <td align="right" valign="top" class="main"><b>' . $oCurrencies->display_price($products[$i]['price'], $products[$i]['tax'], $products[$i]['quantity']) . '</b>';
    }
    // Product options prices
    if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
        foreach ($products[$i]['attributes'] as $option => $value) {
            if ($products[$i][$option]['options_values_price'] != 0) {
                if ($sPage != $aPages['account_history_info']) {
                    $shopping_cart_detail .= '<br /><small><i>' . $products[$i][$option]['price_prefix'] . $oCurrencies->display_price($products[$i][$option]['options_values_price'], oos_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</i></small>';
                } else {
                    $shopping_cart_detail .= '<br /><small><i>' . $products[$i][$option]['price_prefix'] . $oCurrencies->display_price($products[$i][$option]['options_values_price'], $products[$i]['tax'], $products[$i]['quantity']) . '</i></small>';
                }
            } else {
                // Keep price aligned with corresponding option
                $shopping_cart_detail .= '<br /><small><i>&nbsp;</i></small>';
            }
        }
    }
    $shopping_cart_detail .= '</td>' . "\n";
}
$shopping_cart_detail .= '  </tr>' . "\n";
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:order_details.php


示例17: cart

 function cart()
 {
     global $oCurrencies;
     $this->content_type = $_SESSION['cart']->get_content_type();
     $nLanguageID = isset($_SESSION['language_id']) ? $_SESSION['language_id'] + 0 : 1;
     // Get database information
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $customerstable = $oostable['customers'];
     $address_booktable = $oostable['address_book'];
     $zonestable = $oostable['zones'];
     $countriestable = $oostable['countries'];
     $sql = "SELECT c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address,\n                       ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city,\n                       ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2,\n                       co.countries_iso_code_3, co.address_format_id, ab.entry_state\n                FROM {$customerstable} c,\n                     {$address_booktable} ab LEFT JOIN\n                     {$zonestable} z\n                 ON  (ab.entry_zone_id = z.zone_id) LEFT JOIN\n                     {$countriestable} co\n                 ON (ab.entry_country_id = co.countries_id)\n                WHERE c.customers_id = '" . intval($_SESSION['customer_id']) . "' AND\n                    ab.customers_id = '" . intval($_SESSION['customer_id']) . "' AND\n                     c.customers_default_address_id = ab.address_book_id";
     $customer_address = $dbconn->GetRow($sql);
     $address_booktable = $oostable['address_book'];
     $zonestable = $oostable['zones'];
     $countriestable = $oostable['countries'];
     $sql = "SELECT ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address,\n                       ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name,\n                       ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2,\n                       c.countries_iso_code_3, c.address_format_id, ab.entry_state\n                FROM {$address_booktable} ab LEFT JOIN\n                     {$zonestable} z\n                  ON (ab.entry_zone_id = z.zone_id) LEFT JOIN\n                     {$countriestable} c ON\n                     (ab.entry_country_id = c.countries_id)\n                WHERE ab.customers_id = '" . intval($_SESSION['customer_id']) . "' AND\n                      ab.address_book_id = '" . intval($_SESSION['sendto']) . "'";
     $shipping_address = $dbconn->GetRow($sql);
     $address_booktable = $oostable['address_book'];
     $zonestable = $oostable['zones'];
     $countriestable = $oostable['countries'];
     $sql = "SELECT ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_street_address,\n                       ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name,\n                       ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2,\n                       c.countries_iso_code_3, c.countries_moneybookers, c.address_format_id, ab.entry_state\n                FROM {$address_booktable} ab LEFT JOIN\n                     {$zonestable} z\n                  ON (ab.entry_zone_id = z.zone_id) LEFT JOIN\n                     {$countriestable} c ON\n                     (ab.entry_country_id = c.countries_id)\n                WHERE ab.customers_id = '" . intval($_SESSION['customer_id']) . "' AND\n                    ab.address_book_id = '" . intval($_SESSION['billto']) . "'";
     $billing_address = $dbconn->GetRow($sql);
     $class =& $_SESSION['payment'];
     $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID, 'campaigns' => $_SESSION['campaigns_id'], 'currency' => $_SESSION['currency'], 'currency_value' => $oCurrencies->currencies[$_SESSION['currency']]['value'], 'payment_method' => $GLOBALS[$class]->title, 'cc_type' => isset($GLOBALS['cc_type']) ? $GLOBALS['cc_type'] : '', 'cc_owner' => isset($GLOBALS['cc_owner']) ? $GLOBALS['cc_owner'] : '', 'cc_number' => isset($GLOBALS['cc_number']) ? $GLOBALS['cc_number'] : '', 'cc_expires' => isset($GLOBALS['cc_expires']) ? $GLOBALS['cc_expires'] : '', 'cc_cvv' => isset($GLOBALS['cc_cvv']) ? $GLOBALS['cc_cvv'] : '', 'shipping_method' => $_SESSION['shipping']['title'], 'shipping_cost' => $_SESSION['shipping']['cost'], 'comments' => isset($_SESSION['comments']) ? $_SESSION['comments'] : '', 'shipping_class' => strpos($shipping['id'], '_') > 0 ? substr(strrev(strchr(strrev($shipping['id']), '_')), 0, -1) : $shipping['id'], 'payment_class' => $_SESSION['payment']);
     if (isset($GLOBALS['payment']) && is_object($GLOBALS['payment'])) {
         $this->info['payment_method'] = $GLOBALS['payment']->title;
         if (isset($GLOBALS['payment']->order_status) && is_numeric($GLOBALS['payment']->order_status) && $GLOBALS['payment']->order_status > 0) {
             $this->info['order_status'] = $GLOBALS['payment']->order_status;
         }
     }
     $this->customer = array('firstname' => $customer_address['customers_firstname'], 'lastname' => $customer_address['customers_lastname'], 'company' => $customer_address['entry_company'], 'street_address' => $customer_address['entry_street_address'], 'suburb' => $customer_address['entry_suburb'], 'city' => $customer_address['entry_city'], 'postcode' => $customer_address['entry_postcode'], 'state' => oos_is_not_null($customer_address['entry_state']) ? $customer_address['entry_state'] : $customer_address['zone_name'], 'zone_id' => $customer_address['entry_zone_id'], 'country' => array('id' => $customer_address['countries_id'], 'title' => $customer_address['countries_name'], 'iso_code_2' => $customer_address['countries_iso_code_2'], 'iso_code_3' => $customer_address['countries_iso_code_3']), 'format_id' => $customer_address['address_format_id'], 'telephone' => $customer_address['customers_telephone'], 'email_address' => $customer_address['customers_email_address']);
     $this->delivery = array('firstname' => $shipping_address['entry_firstname'], 'lastname' => $shipping_address['entry_lastname'], 'company' => $shipping_address['entry_company'], 'street_address' => $shipping_address['entry_street_address'], 'suburb' => $shipping_address['entry_suburb'], 'city' => $shipping_address['entry_city'], 'postcode' => $shipping_address['entry_postcode'], 'state' => oos_is_not_null($shipping_address['entry_state']) ? $shipping_address['entry_state'] : $shipping_address['zone_name'], 'zone_id' => $shipping_address['entry_zone_id'], 'country' => array('id' => $shipping_address['countries_id'], 'title' => $shipping_address['countries_name'], 'iso_code_2' => $shipping_address['countries_iso_code_2'], 'iso_code_3' => $shipping_address['countries_iso_code_3']), 'country_id' => $shipping_address['entry_country_id'], 'format_id' => $shipping_address['address_format_id']);
     $this->billing = array('firstname' => $billing_address['entry_firstname'], 'lastname' => $billing_address['entry_lastname'], 'company' => $billing_address['entry_company'], 'street_address' => $billing_address['entry_street_address'], 'suburb' => $billing_address['entry_suburb'], 'city' => $billing_address['entry_city'], 'postcode' => $billing_addres 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP oos_href_link函数代码示例发布时间:2022-05-15
下一篇:
PHP oos_get_products_special_price函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap