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


PHP TiendaSelect::zone方法代码示例

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


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

示例1: getZones

 /**
  * Returns a selectlist of zones
  * Called via Ajax
  * 
  * @return unknown_type
  */
 function getZones()
 {
     Tienda::load('TiendaSelect', 'library.select');
     $html = '';
     $text = '';
     $country_id = JRequest::getVar('country_id');
     $name = JRequest::getVar('name', 'zone_id');
     if (empty($country_id)) {
         $html = JText::_('COM_TIENDA_SELECT_COUNTRY_FIRST');
     } else {
         $html = TiendaSelect::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:annggeel,项目名称:tienda,代码行数:25,代码来源:addresses.php

示例2: filterZones

 /**
  * 
  * @return unknown_type
  */
 function filterZones()
 {
     JLoader::import('com_tienda.library.json', JPATH_ADMINISTRATOR . '/components');
     Tienda::load('TiendaSelect', 'library.select');
     $idtag = 'zone_id';
     $countryid = JRequest::getVar('countryid', '', 'request', 'int');
     $idprefix = JRequest::getVar('idprefix', '', 'request');
     if (count($idprefix) > 0) {
         $idtag = $idprefix . $idtag;
     }
     $url = "index.php?option=com_tienda&format=raw&controller=zones&task=addZone&geozoneid=";
     $attribs = array('class' => 'inputbox', 'size' => '1');
     $hookgeozone = JRequest::getVar('hookgeozone', TRUE, 'request', 'boolean');
     if ($hookgeozone) {
         $attribs['onchange'] = 'tiendaDoTask( \'' . $url . '\'+document.getElementById(\'geozone_id\').value+\'&zoneid=\'+this.options[this.selectedIndex].value, \'current_zones_wrapper\', \'\');';
     }
     $html = TiendaSelect::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:annggeel,项目名称:tienda,代码行数:28,代码来源:zones.php

示例3:

?>
				</td>
			</tr>
			<tr>
				<th style="width: 100px; text-align: right;" class="key">
				<?php 
echo JText::_('ZONE');
?>
				</th>
				<td>
				<div id="zones_wrapper">
					<?php 
if (empty($row->zone_id)) {
    echo JText::_("SELECT COUNTRY FIRST");
} else {
    echo TiendaSelect::zone($row->zone_id, 'zone_id', $row->country_id);
}
?>
				</div>
				</td>
			</tr>
			<tr>
				<th style="width: 100px; text-align: right;" class="key">
				<?php 
echo JText::_('POSTAL CODE');
?>
				</th>
				<td>
				<input type="text" name="postal_code"
				id="postal_code" size="25" maxlength="250"
				value="<?php 
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:address.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', 'TiendaModel');
     $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);
     JModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/models');
     $countries_model = JModel::getInstance('Countries', 'TiendaModel');
     $default_country = $countries_model->getDefault();
     $default_country_id = $default_country->country_id;
     $attribs = array('class' => 'inputbox', 'size' => '1');
     if ($this->onepage_checkout) {
         //$attribs['onchange'] = 'tiendaCheckoutAutomaticShippingRatesUpdate( \''.$prefix.'zone_id\', \''.JText::_('COM_TIENDA_UPDATING_SHIPPING_RATES').'\', \''.JText::_('COM_TIENDA_UPDATING_CART').'\', \''.JText::_('COM_TIENDA_UPDATING_ADDRESS').'\', \''.JText::_('COM_TIENDA_UPDATING_PAYMENT_METHODS').'\' ); ';
     }
     Tienda::load('TiendaSelect', 'library.select');
     $zones = TiendaSelect::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:annggeel,项目名称:tienda,代码行数:41,代码来源:checkout.php

示例5:

                </td>
            </tr>
            <tr>
                <td style="width: 100px; text-align: right;" class="key">
                    <?php 
echo JText::_('COM_TIENDA_ZONE');
?>
:
                </td>
                <td>
                    <div id="shipping_zones_wrapper">
                        <?php 
if (empty($row->orderinfo->shipping_zone_id)) {
    echo JText::_('COM_TIENDA_SELECT_COUNTRY_FIRST');
} else {
    echo TiendaSelect::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:annggeel,项目名称:tienda,代码行数:30,代码来源:form_addresses.php

示例6:

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

示例7: array

		<?php 
if ($elements['zone'][0]) {
    ?>
		<div class="control-group">
			<label class="key">
				<?php 
    echo JText::_('COM_TIENDA_STATE_PROVINCE');
    ?>
			</label>
			<div id="<?php 
    echo $this->form_prefix;
    ?>
zones_wrapper">
				<?php 
    $attribs = array('class' => 'required', 'size' => '1');
    echo TiendaSelect::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:annggeel,项目名称:tienda,代码行数:31,代码来源:shipping.php

示例8: getZones

 /**
  * Returns a selectlist of zones
  * Called via Ajax
  *
  * @return unknown_type
  */
 function getZones()
 {
     Tienda::load('TiendaSelect', 'library.select');
     $html = '';
     $text = '';
     $country_id = JRequest::getVar('country_id');
     $prefix = JRequest::getVar('prefix');
     $html = TiendaSelect::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:annggeel,项目名称:tienda,代码行数:21,代码来源:addresses.php

示例9: getZones

 /**
  * Returns a selectlist of zones
  * Called via Ajax
  *
  * @return unknown_type
  */
 function getZones()
 {
     Tienda::load('TiendaSelect', 'library.select');
     $html = '';
     $text = '';
     $country_id = JRequest::getVar('country_id');
     $prefix = JRequest::getVar('prefix');
     $html = TiendaSelect::zone('', $prefix . 'zone_id', $country_id, array('class' => 'inputbox', 'size' => '1'), $prefix . 'zone_id', true);
     $response = array();
     $response['msg'] = $html;
     $response['error'] = '';
     return json_encode($response);
 }
开发者ID:annggeel,项目名称:tienda,代码行数:19,代码来源:genericexporter.php


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