本文整理汇总了PHP中CitruscartSelect类的典型用法代码示例。如果您正苦于以下问题:PHP CitruscartSelect类的具体用法?PHP CitruscartSelect怎么用?PHP CitruscartSelect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CitruscartSelect类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: btbooleanlist
/**
* A boolean radiolist that uses bootstrap
*
* @param unknown_type $name
* @param unknown_type $attribs
* @param unknown_type $selected
* @param unknown_type $yes
* @param unknown_type $no
* @param unknown_type $id
* @return string
*/
public static function btbooleanlist($name, $attribs = null, $selected = null, $yes = 'JYES', $no = 'JNO', $id = false)
{
JHTML::_('script', 'bootstrapped-advanced-ui.js', 'media/citruscart/js/');
JHTML::_('stylesheet', 'bootstrapped-advanced-ui.css', 'media/citruscart/css/');
$arr = array(JHtml::_('select.option', '0', JText::_($no)), JHtml::_('select.option', '1', JText::_($yes)));
$html = '<div class="control-group"><div class="controls"><fieldset id="' . $name . '" class="radio btn-group">';
$html .= CitruscartSelect::btradiolist($arr, $name, $attribs, 'value', 'text', (int) $selected, $id);
$html .= '</fieldset></div></div>';
return $html;
}
示例3: getProductAttributeOptions
/**
* Expected to be called from ajax
*/
public function getProductAttributeOptions()
{
$app = JFactory::getApplication();
$attribute_id = $app->input->getInt('attribute_id', 0);
$name = $app->input->getString('select_name', 'parent');
$id = $app->input->getString('select_id', '0');
$response = array();
$response['msg'] = '';
$response['error'] = '';
if ($attribute_id) {
Citruscart::load('CitruscartSelect', 'library.select');
$response['msg'] = CitruscartSelect::productattributeoptions($attribute_id, 0, $name . "[" . $id . "]");
} else {
$response['msg'] = '<input type="hidden" name="' . $name . "[" . $id . "]" . '" />';
}
echo json_encode($response);
}
示例4: 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;
}
示例5:
echo CitruscartSelect::editableby($row['editable_by'], 'editable_by');
?>
</td>
</tr>
<tr>
<td width="100" align="right" class="key">
<label for="eavattribute_required">
<?php
echo JText::_('COM_CITRUSCART_REQUIRED');
?>
:
</label>
</td>
<td>
<?php
echo CitruscartSelect::btbooleanlist('eavattribute_required', '', $row['eavattribute_required']);
?>
</td>
</tr>
<tr>
<td class="dsc-key">
<?php
echo JText::_('COM_CITRUSCART_FORMAT_STRFTIME');
?>
:
</td>
<td class="dsc-value">
<input type="text" name="eavattribute_format_strftime" id="eavattribute_format_strftime" value="<?php
echo $row['eavattribute_format_strftime'];
?>
" size="30" maxlength="250" />
示例6: array
<th style="<?php
echo $key_style;
?>
" class="key">
<?php
if ($elements['country'][1]) {
echo CitruscartGrid::required();
}
echo JText::_('COM_CITRUSCART_COUNTRY');
?>
</th>
<td>
<?php
$url = "index.php?option=com_citruscart&format=raw&controller=pos&task=getzones&prefix={$this->form_prefix}&country_id=";
$attribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => 'citruscartDoTask( \'' . $url . '\'+document.getElementById(\'' . $this->form_prefix . 'country_id\').value, \'' . $this->form_prefix . 'zones_wrapper\', \'\');');
echo CitruscartSelect::country($this->default_country_id, $this->form_prefix . 'country_id', $attribs, $this->form_prefix . 'country_id', false, true);
?>
</td>
</tr>
<?php
}
if ($elements['zone'][0]) {
?>
<tr>
<th style="<?php
echo $key_style;
?>
" class="key">
<?php
if ($elements['zone'][1]) {
echo CitruscartGrid::required();
示例7:
?>
</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>
示例8: 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;
}
示例9:
</th>
<th>
<input type="text" id="filter_code3" name="filter_code3" value="<?php
echo $state->filter_code3;
?>
" size="15" placeholder="<?php
echo JText::_('COM_CITRUSCART_ISO_CODE_3');
?>
"/>
</th>
<th>
</th>
<th>
<?php
echo CitruscartSelect::booleans($state->filter_enabled, 'filter_enabled', $attribs, 'enabled', true);
?>
</th>
</tr>
<tr>
<th colspan="20" style="font-weight: normal;">
<div style="float: right; padding: 5px;"><?php
echo $this->pagination->getResultsCounter();
?>
</div>
<div style="float: left;"><?php
echo $this->pagination->getListFooter();
?>
</div>
</th>
</tr>
示例10: foreach
if (!$selected_opts) {
$selected_opts = $default;
$selected_opts[] = 0;
}
foreach ($attributes as $attribute) {
?>
<div class="pao" id='productattributeoption_<?php
echo $attribute->productattribute_id;
?>
'>
<?php
echo "<span>" . $attribute->productattribute_name . " : </span>";
$key = 'attribute_' . $attribute->productattribute_id;
$selected = !empty($values[$key]) ? $values[$key] : $default[$attribute->productattribute_id];
$attribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => "Citruscart.UpdateChangedAttribute( document.adminForm, " . $attribute->productattribute_id . ");Citruscart.UpdateAddToCart( 'pos', 'product_buy', document.adminForm, true );", 'changed_attr' => $changed_attr, 'changed_pao' => $changed_pao, 'pid' => $row->product_id);
echo CitruscartSelect::productattributeoptions($attribute->productattribute_id, $selected, $key, $attribs, null, $selected_opts);
?>
</div>
<?php
}
if (count($attributes)) {
?>
<input type="hidden" name="changed_attr" value="" />
<?php
}
?>
<?php
if (!empty($this->onDisplayProductAttributeOptions)) {
?>
<div class='onDisplayProductAttributeOptions_wrapper'>
示例11:
<th style="text-align: left;">
<input id="filter_name" name="filter_name" value="<?php
echo $state->filter_name;
?>
" size="25" placeholder="<?php
echo JText::_('COM_CITRUSCART_NAME');
?>
"/>
</th>
<th>
</th>
<th>
</th>
<th>
<?php
echo CitruscartSelect::geozonetypes($state->filter_geozonetype, 'filter_geozonetype', $attribs, 'geozonetype', true);
?>
</th>
</tr>
<tr>
<th colspan="20" style="font-weight: normal;">
<div style="float: right; padding: 5px;"><?php
echo $this->pagination->getResultsCounter();
?>
</div>
<div style="float: left;"><?php
echo $this->pagination->getListFooter();
?>
</div>
</th>
</tr>
示例12:
<?php
echo JText::_('COM_CITRUSCART_CATEGORY_LAYOUT_FILE_DESC');
?>
</div>
</td>
</tr>
<tr>
<td style="vertical-align: top; width: 100px; text-align: right;" class="key">
<?php
echo JText::_('COM_CITRUSCART_CATEGORY_PRODUCTS_LAYOUT_FILE');
?>
:
</td>
<td>
<?php
echo CitruscartSelect::productlayout($row->categoryproducts_layout, 'categoryproducts_layout');
?>
<div class="well note">
<?php
echo JText::_('COM_CITRUSCART_CATEGORY_PRODUCTS_LAYOUT_FILE_DESC');
?>
</div>
</td>
</tr>
<tr>
<td style="width: 100px; text-align: right;" class="key">
<label for="category_description">
<?php
echo JText::_('COM_CITRUSCART_DESCRIPTION');
?>
:
示例13: array
<td>
<input type="text" name="billing_input_city" id="billing_input_city"
size="48" maxlength="250" value="" />
</td>
</tr>
<tr>
<th width="100" align="right" class="key">
<?php
echo JText::_('COM_CITRUSCART_COUNTRY');
?>
:
</th>
<td><?php
$url = "index.php?option=com_citruscart&format=raw&controller=zones&task=filterzones&hookgeozone=false&idprefix=billing_input_&countryid=";
$attribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => 'citruscartDoTask( \'' . $url . '\'+document.getElementById(\'billing_input_country_id\').value, \'billing_zones_wrapper\', \'\');');
echo CitruscartSelect::country(0, 'billing_input_country_id', $attribs, 'billing_input_country_id', true);
?>
</td>
</tr>
<tr>
<th width="100" align="right" class="key">
<?php
echo JText::_('COM_CITRUSCART_ZONE');
?>
:
</th>
<td>
<div id="billing_zones_wrapper"></div>
</td>
</tr>
<tr>
示例14:
<td><?php
echo CitruscartSelect::orderstate($this->row->get('initial_order_state', '15'), 'initial_order_state');
?>
</td>
<td><?php
echo JText::_('COM_CITRUSCART_INITIAL_ORDER_STATE_DESC');
?>
</td>
</tr>
<tr>
<th style="width: 25%;"><?php
echo JText::_('COM_CITRUSCART_PENDING_ORDER_STATE');
?>
</th>
<td><?php
echo CitruscartSelect::orderstate($this->row->get('pending_order_state', '1'), 'pending_order_state');
?>
</td>
<td><?php
echo JText::_('COM_CITRUSCART_PENDING_ORDER_STATE_DESC');
?>
</td>
</tr>
<tr>
<th style="width: 25%;"><?php
echo JText::_('COM_CITRUSCART_ORDER_NUMBER_PREFIX');
?>
</th>
<td><input type="text" name="order_number_prefix" value="<?php
echo $this->row->get('order_number_prefix', '');
?>
示例15: defined
# Technical Support: Forum - http://citruscart.com/forum/index.html
-------------------------------------------------------------------------*/
/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Restricted access');
$row = $this->row;
?>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th style="width: 25%;"><?php
echo JText::_('COM_CITRUSCART_DISPLAY_DEFAULT_CATEGORY_IMAGE');
?>
</th>
<td><?php
echo CitruscartSelect::btbooleanlist('use_default_category_image', '', $this->row->get('use_default_category_image', '1'));
?>
</td>
</tr>
<tr>
<th style="width: 25%;"><?php
echo JText::_('COM_CITRUSCART_DEFAULT_PRODUCT_IMAGE_HEIGHT');
?>
</th>
<td><input type="text" name="product_img_height" value="<?php
echo $this->row->get('product_img_height', '');
?>
" />
</td>
</tr>
<tr>