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


PHP CitruscartSelect::zone方法代码示例

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


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

示例1: filterZones

 /**
  *
  * @return unknown_type
  */
 function filterZones()
 {
     $app = JFactory::getApplication();
     JLoader::import('com_citruscart.library.json', JPATH_ADMINISTRATOR . '/components');
     Citruscart::load('CitruscartSelect', 'library.select');
     $idtag = 'zone_id';
     $countryid = $app->input->getInt('countryid', 0);
     $idprefix = $app->input->getInt('idprefix', 0);
     /*
     		$countryid = JRequest::getVar( 'countryid', '', 'request', 'int' );
     		$idprefix = JRequest::getVar( 'idprefix', '', 'request');
     */
     if (count($idprefix) > 0) {
         $idtag = $idprefix . $idtag;
     }
     $url = "index.php?option=com_citruscart&format=raw&controller=zones&task=addZone&geozoneid=";
     $attribs = array('class' => 'inputbox', 'size' => '1');
     $hookgeozone = $app->input->get('hookgeozone', TRUE);
     //$hookgeozone = JRequest::getVar( 'hookgeozone', TRUE, 'request', 'boolean' );
     if ($hookgeozone) {
         $attribs['onchange'] = 'citruscartDoTask( \'' . $url . '\'+document.getElementById(\'geozone_id\').value+\'&zoneid=\'+this.options[this.selectedIndex].value, \'current_zones_wrapper\', \'\');';
     }
     $html = CitruscartSelect::zone('', $idtag, $countryid, $attribs, $idtag, true);
     // set response array
     $response = array();
     $response['msg'] = $html;
     // encode and echo (need to echo to send back to browser)
     echo json_encode($response);
     return;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:34,代码来源:zones.php

示例2: getZones

 /**
  * @Returns a selectlist of zones
  * @Called via Ajax
  *
  * @return unknown_type
  */
 function getZones()
 {
     $app = JFactory::getApplication();
     Citruscart::load('CitruscartSelect', 'library.select');
     $html = '';
     $text = '';
     $country_id = $app->input->getInt('country_id');
     $name = $app->input->get('name', 'zone_id');
     if (empty($country_id)) {
         $html = JText::_('COM_CITRUSCART_SELECT_COUNTRY_FIRST');
     } else {
         $html = CitruscartSelect::zone('', $name, $country_id);
     }
     $response = array();
     $response['msg'] = $html;
     $response['error'] = '';
     // encode and echo (need to echo to send back to browser)
     echo json_encode($response);
     return;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:26,代码来源:addresses.php

示例3:

?>
        </td>
	</tr>
	<tr>
		<th style="width: 100px; text-align: right;" class="key">
            <?php 
echo JText::_('COM_CITRUSCART_ZONE');
?>
		</th>
		<td>
            <div id="zones_wrapper">
            <?php 
if (empty($row->zone_id)) {
    echo JText::_('COM_CITRUSCART_SELECT_COUNTRY_FIRST');
} else {
    echo CitruscartSelect::zone(@$row->zone_id, 'zone_id', @$row->country_id);
}
?>
            </div>
		</td>
	</tr>
  <?php 
if ($config->get('show_field_zip', '3') != '0') {
    ?>
	<tr>
      <th style="width: 100px; text-align: right;" class="key">
	       <?php 
    echo JText::_('COM_CITRUSCART_POSTAL_CODE');
    ?>
    	</th>
      <td>
开发者ID:joomlacorner,项目名称:citruscart,代码行数:31,代码来源:form_inner.php

示例4: getAddressForm

 /**
  * Gets an address form for display
  *
  * param string $prefix
  * return string html
  */
 function getAddressForm($prefix, $guest = false, $forShipping = false)
 {
     $html = '';
     $model = $this->getModel('addresses', 'CitruscartModel');
     $view = $this->getView($this->get('suffix'), 'html');
     $view->set('_controller', $this->get('suffix'));
     $view->set('_view', $this->get('suffix'));
     $view->set('_doTask', true);
     $view->set('hidemenu', true);
     $view->set('form_prefix', $prefix);
     $view->set('guest', $guest);
     $view->setLayout('form_address');
     // Checking whether shipping is required
     $showShipping = false;
     $cartsModel = $this->getModel('carts');
     if ($isShippingEnabled = $cartsModel->getShippingIsEnabled()) {
         $showShipping = true;
     }
     $view->assign('showShipping', $showShipping);
     $view->assign('forShipping', $forShipping);
     JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_citruscart/models');
     $countries_model = JModelLegacy::getInstance('Countries', 'CitruscartModel');
     $default_country = $countries_model->getDefault();
     $default_country_id = $default_country->country_id;
     $attribs = array('class' => 'inputbox', 'size' => '1');
     if ($this->onepage_checkout) {
         //$attribs['onchange'] = 'citruscartCheckoutAutomaticShippingRatesUpdate( \''.$prefix.'zone_id\', \''.JText::_('COM_CITRUSCART_UPDATING_SHIPPING_RATES').'\', \''.JText::_('COM_CITRUSCART_UPDATING_CART').'\', \''.JText::_('COM_CITRUSCART_UPDATING_ADDRESS').'\', \''.JText::_('COM_CITRUSCART_UPDATING_PAYMENT_METHODS').'\' ); ';
     }
     Citruscart::load('CitruscartSelect', 'library.select');
     $zones = CitruscartSelect::zone('', $prefix . 'zone_id', $default_country_id, $attribs, $prefix . 'zone_id');
     $view->assign('default_country_id', $default_country_id);
     $view->assign('zones', $zones);
     $html = $view->loadTemplate();
     return $html;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:41,代码来源:checkout.php

示例5:

            </td>
            <td></td>
        </tr>
        <tr>
            <th style="width: 25%;"><?php 
echo JText::_('COM_CITRUSCART_STATE_REGION');
?>
            </th>
            <td>
                <div id="zones_wrapper">
                    <?php 
$shop_zone = $this->row->get('shop_zone', '');
if (empty($shop_zone)) {
    echo JText::_('COM_CITRUSCART_SELECT_COUNTRY_FIRST');
} else {
    echo CitruscartSelect::zone($shop_zone, 'shop_zone', $this->row->get('shop_country', ''));
}
?>
                </div>
            </td>
            <td></td>
        </tr>
        <tr>
            <th style="width: 25%;"><?php 
echo JText::_('COM_CITRUSCART_POSTAL_CODE');
?>
            </th>
            <td><input type="text" name="shop_zip" value="<?php 
echo $this->row->get('shop_zip', '');
?>
" />
开发者ID:joomlacorner,项目名称:citruscart,代码行数:31,代码来源:default_shop.php

示例6:

                </td>
            </tr>
            <tr>
                <td style="width: 100px; text-align: right;" class="key">
                    <?php 
echo JText::_('COM_CITRUSCART_ZONE');
?>
:
                </td>
                <td>
                    <div id="shipping_zones_wrapper">
                        <?php 
if (empty($row->orderinfo->shipping_zone_id)) {
    echo JText::_('COM_CITRUSCART_SELECT_COUNTRY_FIRST');
} else {
    echo CitruscartSelect::zone($row->orderinfo->shipping_zone_id, 'shipping_zone_id', $row->orderinfo->shipping_country_id);
}
?>
                    </div>
                </td>
            </tr>
        </table>
    </fieldset>

    <input type="hidden" name="id" value="<?php 
echo $row->order_id;
?>
" />
    <input type="hidden" name="task" id="task" value="saveAddresses" />
</form>
开发者ID:joomlacorner,项目名称:citruscart,代码行数:30,代码来源:form_addresses.php

示例7: array

		<?php 
if ($elements['zone'][0]) {
    ?>
		<div class="control-group">
			<label class="key">
				<?php 
    echo JText::_('COM_CITRUSCART_STATE_PROVINCE');
    ?>
			</label>
			<div id="<?php 
    echo $this->form_prefix;
    ?>
zones_wrapper">
				<?php 
    $attribs = array('class' => 'required', 'size' => '1');
    echo CitruscartSelect::zone('', $this->form_prefix . 'zone_id', $this->default_country_id, $attribs, $this->form_prefix . 'zone_id');
    ?>
			</div>
		</div>
		<?php 
}
?>

    	<?php 
if ($elements['zip'][0]) {
    ?>
		<div class="control-group">
			<label for="<?php 
    echo $this->form_prefix;
    ?>
postal_code">
开发者ID:joomlacorner,项目名称:citruscart,代码行数:31,代码来源:billing.php

示例8: getZones

 /**
  * Returns a selectlist of zones
  * Called via Ajax
  *
  * @return unknown_type
  */
 function getZones()
 {
     Citruscart::load('CitruscartSelect', 'library.select');
     $html = '';
     $text = '';
     /* Get the application */
     $app = JFactory::getApplication();
     $country_id = $app->input->getInt('country_id');
     //$country_id = JRequest::getVar('country_id');
     $prefix = $app->input->getString('prefix');
     //$prefix = JRequest::getVar('prefix');
     if (empty($country_id)) {
         $html = JText::_('COM_CITRUSCART_SELECT_COUNTRY');
     } else {
         $html = CitruscartSelect::zone('', $prefix . 'zone_id', $country_id);
     }
     $response = array();
     $response['msg'] = $html . " *";
     $response['error'] = '';
     // encode and echo (need to echo to send back to browser)
     echo json_encode($response);
     return;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:29,代码来源:pos.php

示例9: getZones

 /**
  * Returns a selectlist of zones
  * Called via Ajax
  *
  * @return unknown_type
  */
 function getZones()
 {
     $input = JFactory::getApplication()->input;
     Citruscart::load('CitruscartSelect', 'library.select');
     $html = '';
     $text = '';
     $country_id = $input->getInt('country_id');
     $prefix = $input->getString('prefix');
     $html = CitruscartSelect::zone('', $prefix . 'zone_id', $country_id);
     $response = array();
     $response['msg'] = $html;
     $response['error'] = '';
     // encode and echo (need to echo to send back to browser)
     echo json_encode($response);
     return;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:22,代码来源:addresses.php


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