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

PHP tep_get_countries函数代码示例

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

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



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

示例1: quote

 function quote($method = '')
 {
     global $_POST, $order, $shipping_weight, $shipping_num_boxes;
     if (tep_not_null($method) && isset($this->types[$method])) {
         $prod = $method;
     } else {
         if ($order->delivery['country']['iso_code_2'] == 'CA') {
             $prod = 'STD';
         } else {
             $prod = 'GNDRES';
         }
     }
     if ($method) {
         $this->_upsAction('3');
     }
     // return a single quote
     $this->_upsProduct($prod);
     $country_name = tep_get_countries(SHIPPING_ORIGIN_COUNTRY, true);
     $this->_upsOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']);
     $this->_upsDest($order->delivery['postcode'], $order->delivery['country']['iso_code_2']);
     $this->_upsRate(MODULE_SHIPPING_UPS_PICKUP);
     $this->_upsContainer(MODULE_SHIPPING_UPS_PACKAGE);
     $this->_upsWeight($shipping_weight);
     $this->_upsRescom(MODULE_SHIPPING_UPS_RES);
     $upsQuote = $this->_upsGetQuote();
     if (is_array($upsQuote) && sizeof($upsQuote) > 0) {
         $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs)');
         $methods = array();
         $allowed_methods = explode(", ", MODULE_SHIPPING_UPS_TYPES);
         $std_rcd = false;
         $qsize = sizeof($upsQuote);
         for ($i = 0; $i < $qsize; $i++) {
             list($type, $cost) = each($upsQuote[$i]);
             if ($type == 'STD') {
                 if ($std_rcd) {
                     continue;
                 } else {
                     $std_rcd = true;
                 }
             }
             if (!in_array($type, $allowed_methods)) {
                 continue;
             }
             $methods[] = array('id' => $type, 'title' => $this->types[$type], 'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
         }
         $this->quotes['methods'] = $methods;
         if ($this->tax_class > 0) {
             $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
         }
     } else {
         $this->quotes = array('module' => $this->title, 'error' => 'We are unable to obtain a rate quote for UPS shipping.<br>Please contact the store if no other alternative is shown.');
     }
     if (tep_not_null($this->icon)) {
         $this->quotes['icon'] = tep_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:eosc,项目名称:EosC-2.3,代码行数:57,代码来源:ups.php


示例2: quote

 function quote($method = '')
 {
     global $osC_Tax, $order, $shipping_weight, $shipping_num_boxes, $osC_Weight;
     if (tep_not_null($method) && isset($this->types[$method])) {
         $prod = $method;
     } else {
         $prod = 'GNDRES';
     }
     if ($method) {
         $this->_upsAction('3');
     }
     // return a single quote
     $this->_upsProduct($prod);
     $shipping_weight = $osC_Weight->convert($shipping_weight, SHIPPING_WEIGHT_UNIT, MODULE_SHIPPING_UPS_WEIGHT_UNIT);
     $country_name = tep_get_countries(SHIPPING_ORIGIN_COUNTRY, true);
     $this->_upsOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']);
     $this->_upsDest($order->delivery['postcode'], $order->delivery['country']['iso_code_2']);
     $this->_upsRate(MODULE_SHIPPING_UPS_PICKUP);
     $this->_upsContainer(MODULE_SHIPPING_UPS_PACKAGE);
     $this->_upsWeight($shipping_weight);
     $this->_upsRescom(MODULE_SHIPPING_UPS_RES);
     $upsQuote = $this->_upsGetQuote();
     if (is_array($upsQuote) && sizeof($upsQuote) > 0) {
         $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs)', 'tax' => 0);
         $methods = array();
         $qsize = sizeof($upsQuote);
         for ($i = 0; $i < $qsize; $i++) {
             list($type, $cost) = each($upsQuote[$i]);
             $methods[] = array('id' => $type, 'title' => $this->types[$type], 'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
         }
         $this->quotes['methods'] = $methods;
         if ($this->tax_class > 0) {
             $this->quotes['tax'] = $osC_Tax->getTaxRate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
         }
     } else {
         $this->quotes = array('module' => $this->title, 'error' => 'An error occured with the UPS shipping calculations.<br>' . $upsQuote . '<br>If you prefer to use UPS as your shipping method, please contact the store owner.');
     }
     if (tep_not_null($this->icon)) {
         $this->quotes['icon'] = tep_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:42,代码来源:ups.php


示例3: quote

 function quote($method = '')
 {
     global $shipping_weight, $shipping_num_boxes, $cart, $offer_order;
     if (defined("SHIPPING_ORIGIN_COUNTRY")) {
         $countries_array = tep_get_countries(SHIPPING_ORIGIN_COUNTRY, true);
         $this->country = $countries_array['countries_iso_code_2'];
     }
     /*
     $SHIPPING_BOX_WEIGHT=1;
     $SHIPPING_BOX_PADDING=0;
     $this->cart_weight_per_one = $this->total_weight;
     if ($SHIPPING_BOX_WEIGHT >= $this->cart_weight_per_one*$SHIPPING_BOX_PADDING/100) {
     	$this->cart_weight_per_one = $this->cart_weight_per_one+$SHIPPING_BOX_WEIGHT;
     }
     else {
     	$this->cart_weight_per_one = $this->cart_weight_per_one + ($this->cart_weight_per_one*$SHIPPING_BOX_PADDING/100);
     }
     
     	  $this->_setPackageType('01');
     //$this->_setPackageType('01');
     
     if ($this->packageType == '01' && $this->cart_weight_per_one < 1) {
       $this->_setWeight(1);
     } else {
     */
     $this->_setPackageType('01');
     $weight = $this->total_weight + $this->pack_nums * $this->pack_weight;
     // ONLY 150 LBS IN PACKAGE !!!!!!!!!!!!
     if ($weight > 150) {
         $addition_packs_num = ceil($weight / '150') - 1;
         $addition_packs_num = 2;
         $this->pack_nums = $this->pack_nums + $addition_packs_num;
         $weight = $weight + $addition_packs_num * $this->pack_weight;
     }
     //echo $weight; echo "<br/>";
     $this->_setWeight($weight);
     $fedexQuote = $this->_getQuote();
     return $fedexQuote;
 }
开发者ID:sgh1986915,项目名称:cakephp2-bpong,代码行数:39,代码来源:class.Fedex.php


示例4: array

 case 'new':
     $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_NEW_ZONE . '</strong>');
     $contents = array('form' => tep_draw_form('zones', FILENAME_ZONES, 'page=' . $HTTP_GET_VARS['page'] . '&action=insert'));
     $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . tep_draw_input_field('zone_name'));
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_CODE . '<br>' . tep_draw_input_field('zone_code'));
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . tep_draw_pull_down_menu('zone_country_id', tep_get_countries()));
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_insert.gif', IMAGE_INSERT) . '&nbsp;<a href="' . tep_href_link(FILENAME_ZONES, 'page=' . $HTTP_GET_VARS['page']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'edit':
     $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_EDIT_ZONE . '</strong>');
     $contents = array('form' => tep_draw_form('zones', FILENAME_ZONES, 'page=' . $HTTP_GET_VARS['page'] . '&zID=' . $zInfo->zone_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . tep_draw_input_field('zone_name', $zInfo->zone_name));
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_CODE . '<br>' . tep_draw_input_field('zone_code', $zInfo->zone_code));
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . tep_draw_pull_down_menu('zone_country_id', tep_get_countries(), $zInfo->countries_id));
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . '&nbsp;<a href="' . tep_href_link(FILENAME_ZONES, 'page=' . $HTTP_GET_VARS['page'] . '&zID=' . $zInfo->zone_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'delete':
     $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_DELETE_ZONE . '</strong>');
     $contents = array('form' => tep_draw_form('zones', FILENAME_ZONES, 'page=' . $HTTP_GET_VARS['page'] . '&zID=' . $zInfo->zone_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br><strong>' . $zInfo->zone_name . '</strong>');
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . '&nbsp;<a href="' . tep_href_link(FILENAME_ZONES, 'page=' . $HTTP_GET_VARS['page'] . '&zID=' . $zInfo->zone_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 default:
     if (isset($zInfo) && is_object($zInfo)) {
         $heading[] = array('text' => '<strong>' . $zInfo->zone_name . '</strong>');
         $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ZONES, 'page=' . $HTTP_GET_VARS['page'] . '&zID=' . $zInfo->zone_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ZONES, 'page=' . $HTTP_GET_VARS['page'] . '&zID=' . $zInfo->zone_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
         $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . $zInfo->zone_name . ' (' . $zInfo->zone_code . ')');
         $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . ' ' . $zInfo->countries_name);
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:zones.php


示例5: tep_get_boards_countries

function tep_get_boards_countries()
{
    $countries_array = array(array('id' => '', 'text' => ''));
    $countries = tep_get_countries();
    reset($countries);
    while (list(, $country_info) = each($countries)) {
        $countries_array[] = array('id' => $country_info['text'], 'text' => $country_info['text']);
    }
    return $countries_array;
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:10,代码来源:boards.php


示例6: osc_draw_input_field

        <td class="smallText" width="40%"><?php 
    echo '<b>' . TEXT_INFO_ZONES_CODE . '</b>';
    ?>
</td>
        <td class="smallText" width="60%"><?php 
    echo osc_draw_input_field('zone_code', $zInfo->zone_code);
    ?>
</td>
      </tr>
      <tr>
        <td class="smallText" width="40%"><?php 
    echo '<b>' . TEXT_INFO_COUNTRY_NAME . '</b>';
    ?>
</td>
        <td class="smallText" width="60%"><?php 
    echo osc_draw_pull_down_menu('zone_country_id', tep_get_countries(), $zInfo->countries_id);
    ?>
</td>
      </tr>
    </table>

    <p align="center"><?php 
    echo '<input type="submit" value="' . IMAGE_UPDATE . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'zDefault\');" class="operationButton">';
    ?>
</p>

    </form>
  </div>
</div>

<div id="infoBox_zDelete" <?php 
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:31,代码来源:zones.php


示例7: tep_get_country_list

function tep_get_country_list($name, $selected = '', $parameters = '')
{
    $countries_array = array(array('id' => '', 'text' => OSCOM::getDef('pull_down_default')));
    $countries = tep_get_countries();
    for ($i = 0, $n = sizeof($countries); $i < $n; $i++) {
        $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
    }
    return HTML::selectField($name, $countries_array, $selected, $parameters);
}
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:9,代码来源:general.php


示例8: array

$contents = array();
if ($action == 'list') {
    switch ($saction) {
        case 'new':
            $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_new_sub_zone') . '</strong>');
            $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&' . (isset($_GET['sID']) ? 'sID=' . $_GET['sID'] . '&' : '') . 'saction=insert_sub')));
            $contents[] = array('text' => OSCOM::getDef('text_info_new_sub_zone_intro'));
            $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country') . '<br />' . HTML::selectField('zone_country_id', tep_get_countries(OSCOM::getDef('text_all_countries')), '', 'onchange="update_zone(this.form);"'));
            $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_zone') . '<br />' . HTML::selectField('zone_id', tep_prepare_country_zones_pull_down()));
            $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&' . (isset($_GET['sID']) ? 'sID=' . $_GET['sID'] : ''))));
            break;
        case 'edit':
            $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_edit_sub_zone') . '</strong>');
            $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=save_sub')));
            $contents[] = array('text' => OSCOM::getDef('text_info_edit_sub_zone_intro'));
            $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country') . '<br />' . HTML::selectField('zone_country_id', tep_get_countries(OSCOM::getDef('text_all_countries')), $sInfo->zone_country_id, 'onchange="update_zone(this.form);"'));
            $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_zone') . '<br />' . HTML::selectField('zone_id', tep_prepare_country_zones_pull_down($sInfo->zone_country_id), $sInfo->zone_id));
            $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id)));
            break;
        case 'delete':
            $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_delete_sub_zone') . '</strong>');
            $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=deleteconfirm_sub')));
            $contents[] = array('text' => OSCOM::getDef('text_info_delete_sub_zone_intro'));
            $contents[] = array('text' => '<br /><strong>' . $sInfo->countries_name . '</strong>');
            $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id)));
            break;
        default:
            if (isset($sInfo) && is_object($sInfo)) {
                $heading[] = array('text' => '<strong>' . $sInfo->countries_name . '</strong>');
                $contents[] = array('align' => 'center', 'text' => HTML::button(OSCOM::getDef('image_edit'), 'fa fa-edit', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=edit')) . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=delete')));
                $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_date_added') . ' ' . DateTime::toShort($sInfo->date_added));
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:geo_zones.php


示例9: tep_cfg_pull_down_country_list

function tep_cfg_pull_down_country_list($country_id)
{
    return HTML::selectField('configuration_value', tep_get_countries(), $country_id);
}
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:4,代码来源:general.php


示例10: array

 case 'new':
     $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_new_zone') . '</strong>');
     $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&action=insert')));
     $contents[] = array('text' => OSCOM::getDef('text_info_insert_intro'));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_zones_name') . '<br />' . HTML::inputField('zone_name'));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_zones_code') . '<br />' . HTML::inputField('zone_code'));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . '<br />' . HTML::selectField('zone_country_id', tep_get_countries()));
     $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'])));
     break;
 case 'edit':
     $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_edit_zone') . '</strong>');
     $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=save')));
     $contents[] = array('text' => OSCOM::getDef('text_info_edit_intro'));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_zones_name') . '<br />' . HTML::inputField('zone_name', $cInfo->zone_name));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_zones_code') . '<br />' . HTML::inputField('zone_code', $cInfo->zone_code));
     $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . '<br />' . HTML::selectField('zone_country_id', tep_get_countries(), $cInfo->countries_id));
     $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id)));
     break;
 case 'delete':
     $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_delete_zone') . '</strong>');
     $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=deleteconfirm')));
     $contents[] = array('text' => OSCOM::getDef('text_info_delete_intro'));
     $contents[] = array('text' => '<br /><strong>' . $cInfo->zone_name . '</strong>');
     $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id)));
     break;
 default:
     if (isset($cInfo) && is_object($cInfo)) {
         $heading[] = array('text' => '<strong>' . $cInfo->zone_name . '</strong>');
         $contents[] = array('align' => 'center', 'text' => HTML::button(OSCOM::getDef('image_edit'), 'fa fa-edit', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=edit')) . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=delete')));
         $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_zones_name') . '<br />' . $cInfo->zone_name . ' (' . $cInfo->zone_code . ')');
         $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . ' ' . $cInfo->countries_name);
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:zones.php


示例11: tep_get_countries

    ?>
          <tr>
            <td class="main"><?php 
    echo OSCOM::getDef('entry_country');
    ?>
</td>
            <td class="main">
<?php 
    if ($error == true) {
        if ($entry_country_error == true) {
            echo HTML::selectField('entry_country_id', tep_get_countries(), $cInfo->entry_country_id) . '&nbsp;' . OSCOM::getDef('entry_country_error');
        } else {
            echo tep_get_country_name($cInfo->entry_country_id) . HTML::hiddenField('entry_country_id');
        }
    } else {
        echo HTML::selectField('entry_country_id', tep_get_countries(), $cInfo->entry_country_id);
    }
    ?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td class="formAreaTitle"><?php 
    echo OSCOM::getDef('category_contact');
    ?>
</td>
      </tr>
      <tr>
        <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
          <tr>
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:customers.php


示例12: tep_href_link

    echo '<a href="' . tep_href_link(FILENAME_SELF_DELIVERY, 'action=new&page=' . $HTTP_GET_VARS['page']) . '">' . tep_image_button('button_insert.gif', IMAGE_INSERT) . '</a>';
    ?>
</td>
			  </tr>
<?php 
}
?>
            </table></td>
<?php 
$heading = array();
$contents = array();
switch ($action) {
    case 'new':
    case 'edit':
        $city_field = '';
        $countries = tep_get_countries('', true);
        if ($action == 'new') {
            $self_delivery = array('country_id' => $countries[0]['id'], 'postcode' => '', 'zone_id' => 0, 'suburb' => '', 'city' => '', 'street_address' => '', 'telephone' => '', 'self_delivery_status' => 0, 'self_delivery_description' => '', 'self_delivery_cost' => '', 'self_delivery_free' => '', 'self_delivery_days' => '', 'self_delivery_only_periodicals' => '');
            $dInfo = new objectInfo($self_delivery);
        }
        if (sizeof($countries == 1)) {
            $country_cities = array();
            $old_city_name = '';
            $parent_cities_query = tep_db_query("select city_id, city_name from " . TABLE_CITIES . " where parent_id = '0' and suburb_name = '' order by city_id");
            while ($parent_cities = tep_db_fetch_array($parent_cities_query)) {
                if ($old_city_name != $parent_cities['city_name']) {
                    $country_cities[$parent_cities['city_id']] = $parent_cities['city_name'];
                    $old_city_name = $parent_cities['city_name'];
                }
            }
            asort($country_cities, SORT_LOCALE_STRING);
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:self_delivery.php


示例13: tep_draw_pull_down_menu

		<td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
		  <tr>
			<td class="main" width="200"><?php 
    echo ENTRY_COUNTRY;
    ?>
</td>
			<td class="main">
<?php 
    if ($error == true) {
        if ($entry_country_error == true) {
            echo tep_draw_pull_down_menu('entry_country_id', array_merge(array(array('id' => '', 'text' => TEXT_DEFAULT_SELECT)), tep_get_countries()), $cInfo->entry_country_id) . '&nbsp;' . ENTRY_COUNTRY_ERROR;
        } else {
            echo tep_get_country_name($cInfo->entry_country_id) . tep_draw_hidden_field('entry_country_id');
        }
    } else {
        echo tep_draw_pull_down_menu('entry_country_id', array_merge(array(array('id' => '', 'text' => TEXT_DEFAULT_SELECT)), tep_get_countries()), $cInfo->entry_country_id, '', ENTRY_COUNTRY_MIN_LENGTH == 'true' ? true : false);
    }
    ?>
</td>
		  </tr>
<?php 
    if (ACCOUNT_STATE == 'true') {
        ?>
		  <tr>
			<td class="main" width="200"><?php 
        echo ENTRY_STATE;
        ?>
</td>
			<td class="main">
<?php 
        $entry_state = tep_get_zone_name($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state);
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:customers.php


示例14: tep_image

    echo tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . ' ' . $zeInfo->countries_name . ': ' . $zeInfo->zone_name;
    ?>
</div>
  <div class="infoBoxContent">
    <?php 
    echo tep_draw_form('zeEdit', FILENAME_GEO_ZONES, 'page=' . $_GET['page'] . '&zID=' . $_GET['zID'] . '&action=list&entriesPage=' . $_GET['entriesPage'] . '&zeID=' . $zeInfo->association_id . '&entriesAction=zeSave');
    ?>

    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="smallText" width="40%"><?php 
    echo '<b>' . TEXT_INFO_COUNTRY . '</b>';
    ?>
</td>
        <td class="smallText" width="60%"><?php 
    echo osc_draw_pull_down_menu('zone_country_id', tep_get_countries(TEXT_ALL_COUNTRIES), $zeInfo->zone_country_id, 'onChange="update_zone(this.form);"');
    ?>
</td>
      </tr>
      <tr>
        <td class="smallText" width="40%"><?php 
    echo '<b>' . TEXT_INFO_COUNTRY_ZONE . '</b>';
    ?>
</td>
        <td class="smallText" width="60%"><?php 
    echo osc_draw_pull_down_menu('zone_id', tep_prepare_country_zones_pull_down($zeInfo->zone_country_id), $zeInfo->zone_id);
    ?>
</td>
      </tr>
    </table>
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:30,代码来源:geo_zones_listing.php


示例15: encodeURIComponent

    if (ORDER_EDITOR_USE_AJAX == 'true') {
        ?>
onChange="updateOrdersField('billing_postcode', encodeURIComponent(this.value))"<?php 
    }
    ?>
></td>
                    <td class="dataTableContent" valign="middle" align="right" nowrap><?php 
    echo ENTRY_COUNTRY;
    ?>
</td>
                    <td class="dataTableContent" valign="top">
          <?php 
    if (ORDER_EDITOR_USE_AJAX == 'true') {
        echo tep_draw_pull_down_menu('update_billing_country_id', tep_get_countries(), $order->billing['country_id'], 'style="width: 200px;" onchange="update_zone(\'update_billing_country_id\', \'update_billing_zone_id\', \'billingStateInput\', \'billingStateMenu\'); updateOrdersField(\'billing_country\', this.options[this.selectedIndex].text);"');
    } else {
        echo tep_draw_pull_down_menu('update_billing_country_id', tep_get_countries(), $order->billing['country_id'], 'style="width: 200px;" onchange="update_zone(\'update_billing_country_id\', \'update_billing_zone_id\', \'billingStateInput\', \'billingStateMenu\'); updateOrdersField(\'billing_country\', this.options[this.selectedIndex].text);"');
    }
    ?>
</td>
                  </tr>
                </table>
                </td>
              </tr>
              <!-- billing_address_eof //-->
              <!-- payment_method bof //-->
              <tr>
                <td class="dataTableContent">
 
      <table cellspacing="0" cellpadding="2" width="100%">
        <tr class="dataTableHeadingRow"> 
          <td colspan="2" class="dataTableHeadingContent"><?php 
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:edit_orders.php


示例16: tep_draw_input_field

            <td class="main"><?php 
    echo ENTRY_POST_CODE;
    ?>
</td>
            <td class="main"><?php 
    echo tep_draw_input_field('affiliate_postcode', $aInfo->affiliate_postcode, 'maxlength="8"', true);
    ?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo ENTRY_COUNTRY;
    ?>
</td>
            <td class="main"><?php 
    echo tep_draw_pull_down_menu('affiliate_country_id', tep_get_countries(), $aInfo->affiliate_country_id, 'onChange="update_zone(this.form);"');
    ?>
</td>
          </tr>
<?php 
    if (ACCOUNT_STATE == 'true') {
        ?>
          <tr>
            <td class="main"><?php 
        echo ENTRY_STATE;
        ?>
</td>
            <td class="main"><?php 
        echo tep_draw_pull_down_menu('affiliate_zone_id', tep_prepare_country_zones_pull_down($aInfo->affiliate_country_id), $aInfo->affiliate_zone_id, 'onChange="resetStateText(this.form);"');
        ?>
</td>
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:31,代码来源:affiliate_affiliates.php


示例17: array

              </tr>
            </table>
<?php 
}
?>
            </td>
<?php 
$heading = array();
$contents = array();
if ($action == 'list') {
    switch ($saction) {
        case 'new':
            $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_NEW_SUB_ZONE . '</strong>');
            $contents = array('form' => tep_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $HTTP_GET_VARS['zpage'] . '&zID=' . $HTTP_GET_VARS['zID'] . '&action=list&spage=' . $HTTP_GET_VARS['spage'] . '&' . (isset($HTTP_GET_VARS['sID']) ? 'sID=' . $HTTP_GET_VARS['sID'] . '&' : '') . 'saction=insert_sub'));
            $contents[] = array('text' => TEXT_INFO_NEW_SUB_ZONE_INTRO);
            $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . '<br>' . tep_draw_pull_down_menu('zone_country_id', tep_get_countries(TEXT_ALL_COUNTRIES), '', 'onChange="getXMLDOM(\'' . FILENAME_GEO_ZONES . '?country_id=\'+this.options[this.selectedIndex].value, \'zone_id\');"') . '<br><div id="zone_id"></div>');
            $contents[] = array('text' => '<br>' . TEXT_INFO_FACTOR . '<br>' . tep_draw_input_field('zone_factor', '', 'size="4"'));
            $contents[] = array('text' => '<br>' . TEXT_INFO_DELIVERY_TIME . '<br>' . tep_draw_input_field('zone_delivery_time'));
            $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a href="' . tep_href_link(FILENAME_GEO_ZONES, 'zpage=' . $HTTP_GET_VARS['zpage'] . '&zID=' . $HTTP_GET_VARS['zID'] . '&action=list&spage=' . $HTTP_GET_VARS['spage'] . '&' . (isset($HTTP_GET_VARS['sID']) ? 'sID=' . $HTTP_GET_VARS['sID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
            break;
        case 'edit':
            $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_EDIT_SUB_ZONE . '</strong>');
            $contents = array('form' => tep_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $HTTP_GET_VARS['zpage'] . '&zID=' . $HTTP_GET_VARS['zID'] . '&action=list&spage=' . $HTTP_GET_VARS['spage'] . '&sID=' . $sInfo->association_id . '&saction=save_sub'));
            $contents[] = array('text' => TEXT_INFO_EDIT_SUB_ZONE_INTRO);
            $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . '<br>' . tep_draw_hidden_field('zone_country_id', $sInfo->zone_country_id) . $sInfo->countries_name);
            $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_ZONE . '<br>' . tep_draw_hidden_field('zone_id', $sInfo->zone_id) . $sInfo->zone_name);
            $zone_cities = tep_get_cities_tree($sInfo->zone_id, 0, '', 0);
            $contents[] = array('text' => '<br>' . TEXT_INFO_CITY_NAME . '<br>' . tep_draw_pull_down_menu('city_id[]', $zone_cities, $sInfo->zone_localities, 'size="15" style="width: 100%;" multiple="multiple"'));
            $contents[] = array('text' => '<br>' . TEXT_INFO_FACTOR . '<br>' . tep_draw_input_field('zone_factor', $sInfo->zone_factor, 'size="4"'));
            $contents[] = array('text' => '<br>' . TEXT_INFO_DELIVERY_TIME . '<br>' . tep_draw_input_field('zone_delivery_time', $sInfo->zone_delivery_time));
            $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_GEO_ZONES, 'zpage=' . $HTTP_GET_VARS['zpage'] . '&zID=' . $HTTP_GET_VARS['zID'] . '&action=list&spage=' . $HTTP_GET_VARS['spage'] . '&sID=' . $sInfo->association_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:geo_zones.php


示例18: quote

 function quote($method = '')
 {
     global $shipping_weight, $shipping_num_boxes, $cart, $order;
     if (tep_not_null($method)) {
         $this->_setService($method);
     }
     if (MODULE_SHIPPING_FEDEX1_ENVELOPE == 'True') {
         if ($shipping_weight <= 0.5 && MODULE_SHIPPING_FEDEX1_WEIGHT == 'LBS' || $shipping_weight <= 0.2 && MODULE_SHIPPING_FEDEX1_WEIGHT == 'KGS') {
             $this->_setPackageType('06');
         } else {
             $this->_setPackageType('01');
         }
     } else {
         $this->_setPackageType('01');
     }
     if ($this->packageType == '01' && $shipping_weight < 1) {
         $this->_setWeight(1);
     } else {
         $this->_setWeight($shipping_weight);
     }
     $totals = $cart->show_total();
     $this->_setInsuranceValue($totals / $shipping_num_boxes);
     if (defined("SHIPPING_ORIGIN_COUNTRY")) {
         $countries_array = tep_get_countries(SHIPPING_ORIGIN_COUNTRY, true);
         $this->country = $countries_array['countries_iso_code_2'];
     } else {
         $this->country = STORE_ORIGIN_COUNTRY;
     }
     $fedexQuote = $this->_getQuote();
     if (is_array($fedexQuote)) {
         if (isset($fedexQuote['error'])) {
             $this->quotes = array('module' => $this->title, 'error' => $fedexQuote['error']);
         } else {
             $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . strtolower(MODULE_SHIPPING_FEDEX1_WEIGHT) . ')');
             $methods = array();
             foreach ($fedexQuote as $type => $cost) {
                 $skip = FALSE;
                 $this->surcharge = 0;
                 if ($this->intl === FALSE) {
                     if (strlen($type) > 2 && MODULE_SHIPPING_FEDEX1_TRANSIT == 'True') {
                         $service_descr = $this->domestic_types[substr($type, 0, 2)] . ' (' . substr($type, 2, 1) . ' days)';
                     } else {
                         $service_descr = $this->domestic_types[substr($type, 0, 2)];
                     }
                     switch (substr($type, 0, 2)) {
                         case 90:
                             if ($order->delivery['company'] != '') {
                                 $skip = TRUE;
                             }
                             break;
                         case 92:
                             if ($this->country == "CA") {
                                 if ($order->delivery['company'] == '') {
                                     $this->surcharge = MODULE_SHIPPING_FEDEX1_RESIDENTIAL;
                                 }
                             } else {
                                 if ($order->delivery['company'] == '') {
                                     $skip = TRUE;
                                 }
                             }
                             break;
                         default:
                             if ($this->country != "CA" && substr($type, 0, 2) < "90" && $order->delivery['company'] == '') {
                                 $this->surcharge = MODULE_SHIPPING_FEDEX1_RESIDENTIAL;
                             }
                             break;
                     }
                 } else {
                     if (strlen($type) > 2 && MODULE_SHIPPING_FEDEX1_TRANSIT == 'True') {
                         $service_descr = $this->international_types[substr($type, 0, 2)] . ' (' . substr($type, 2, 1) . ' days)';
                     } else {
                         $service_descr = $this->international_types[substr($type, 0, 2)];
                     }
                 }
                 if ($method) {
                     if (substr($type, 0, 2) != $method) {
                         $skip = TRUE;
                     }
                 }
                 if (!$skip) {
                     $methods[] = array('id' => substr($type, 0, 2), 'title' => $service_descr, 'cost' => (SHIPPING_HANDLING + MODULE_SHIPPING_FEDEX1_SURCHARGE + $this->surcharge + $cost) * $shipping_num_boxes);
                 }
             }
             $this->quotes['methods'] = $methods;
             if ($this->tax_class > 0) {
                 $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
             }
         }
     } else {
         $this->quotes = array('module' => $this->title, 'error' => 'An error occured with the fedex shipping calculations.<br>Fedex may not deliver to your country, or your postal code may be wrong.');
     }
     if (tep_not_null($this->icon)) {
         $this->quotes['icon'] = tep_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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