/** * 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/com_tienda/js/'); JHTML::_('stylesheet', 'bootstrapped-advanced-ui.css', 'media/com_tienda/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 .= TiendaSelect::btradiolist($arr, $name, $attribs, 'value', 'text', (int) $selected, $id); $html .= '</fieldset></div></div>'; return $html; }
/** * Expected to be called from ajax */ public function getProductAttributeOptions() { $attribute_id = JRequest::getInt('attribute_id', 0); $name = JRequest::getVar('select_name', 'parent'); $id = JRequest::getVar('select_id', '0'); $response = array(); $response['msg'] = ''; $response['error'] = ''; if ($attribute_id) { Tienda::load('TiendaSelect', 'library.select'); $response['msg'] = TiendaSelect::productattributeoptions($attribute_id, 0, $name . "[" . $id . "]"); } else { $response['msg'] = '<input type="hidden" name="' . $name . "[" . $id . "]" . '" />'; } echo json_encode($response); }
function fetchElement($name, $value, &$node, $control_name) { $mainframe = JFactory::getApplication(); Tienda::load('TiendaSelect', 'library.select'); $id = JRequest::getInt('cid'); if ($id) { $K2Item = JTable::getInstance('K2Item', 'Table'); $K2Item->load($id); $params = new K2Parameter($K2Item->plugins, JPATH_PLUGINS . '/k2/tienda.xml', 'tienda'); $id = $params->get('productID'); $db = JFactory::getDBO(); $query = "SELECT manufacturer_id FROM #__tienda_products WHERE product_id=" . (int) $id; $db->setQuery($query); $manufacturer = $db->loadResult(); } return TiendaSelect::manufacturer(@$manufacturer, 'plugins[tiendaproductManufacturer]', '', 'pluginstiendaproductManufacturer', false, true); }
/** * 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; }
/** * * @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; }
<div class="rangeline"> <span class="label"><?php echo JText::_('COM_TIENDA_TO'); ?> :</span> <input type="text" id="filter_quantity_to" name="filter_quantity_to" value="<?php echo @$state->filter_quantity_to; ?> " size="5" class="input input-tiny" /> </div> </div> </th> <th> </th> <th> <?php echo TiendaSelect::booleans(@$state->filter_enabled, 'filter_enabled', $attribs, 'enabled', true, 'COM_TIENDA_ENABLED_STATE'); ?> </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>
</div></li> <li class="divider-vertical"></li> <li> <div class="input-prepend input-append"> <span class="add-on"><?php echo JText::_('COM_TIENDA_TO'); ?> :</span> <?php echo JHTML::calendar(@$state->filter_date_to, "filter_date_to", "filter_date_to", '%Y-%m-%d 00:00:00'); ?> </div></li> <li class="divider-vertical"></li> <li> <?php //$attribs = array('class' => '', 'onchange' => 'javascript:submitbutton(\'view\').click;'); ?> <span class="label pull-left"><?php echo JText::_('LIMIT'); ?> </span> <?php echo TiendaSelect::limit(@$state->limit ? $state->limit : '20', 'limit', $attribs, 'limit', true); ?> </li> </ul></li> </div> </div>
echo $this->row->get('subscriptions_expiring_notice_days', '14'); ?> " type="text" /> </td> <td><?php echo JText::_('COM_TIENDA_EXPIRATION_NOTICE_DESC'); ?> </td> </tr> <tr> <th style="width: 25%;"><?php echo JText::_('COM_TIENDA_DISPLAY_SUBSCRIPTION_NUMBER'); ?> </th> <td><?php echo TiendaSelect::btbooleanlist('display_subnum', 'class="inputbox"', $this->row->get('display_subnum', '0')); ?> </td> <td></td> </tr> <tr> <th style="width: 25%;"><?php echo JText::_('COM_TIENDA_DISPLAY_SUBSCRIPTION_NUMBER_DIGITS'); ?> </th> <td><input type="text" name="sub_num_digits" value="<?php echo $this->row->get('sub_num_digits', ''); ?> " class="inputbox" size="10" /> </td> <td></td>
<input type="text" name="shipping_method_weightbased_name" id="shipping_method_weightbased_name" value="<?php echo @$row->shipping_method_weightbased_name; ?> " size="48" maxlength="250" /> </td> </tr> <tr> <td width="100" align="right" class="key"><label for="tax_class_id"> <?php echo JText::_('COM_TIENDA_TAX_CLASS'); ?> : </label> </td> <td> <?php echo TiendaSelect::taxclass(@$row->tax_class_id, 'tax_class_id', '', 'tax_class_id', false); ?> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="shipping_method_weightbased_enabled"> <?php echo JText::_('COM_TIENDA_ENABLED'); ?> :</label> </td> <td> <?php echo JHTML::_('select.booleanlist', 'shipping_method_weightbased_enabled', '', @$row->shipping_method_weightbased_enabled); ?> </td>
</tr> </table> <table class="adminlist" style="clear: both;" > <thead> <tr class="filterline"> <th> <?php $attribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => 'document.adminForm.submit();'); ?> </th> <th> </th> <th> <?php echo TiendaSelect::downloadableproduct(JFactory::getUser()->id, @$state->filter_product_id, 'filter_product_id', $attribs); ?> </th> <th> </th> </tr> <tr> <th style="width: 50px;"> </th> <th style="width: 200px; text-align: left;"> <?php echo TiendaGrid::sort('COM_TIENDA_FILE', "filename", @$state->direction, @$state->order); ?> </th> <th style="width: 200px;"> <?php
?> </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
?> <?php echo TiendaSelect::reportrange(@$state->filter_range ? $state->filter_range : 'custom', 'filter_range', $attribs, 'range', true); ?> <span class="label"><?php echo JText::_('COM_TIENDA_FROM'); ?> :</span> <?php echo JHTML::calendar(@$state->filter_date_from, "filter_date_from", "filter_date_from", '%Y-%m-%d %H:%M:%S'); ?> <span class="label"><?php echo JText::_('COM_TIENDA_TO'); ?> :</span> <?php echo JHTML::calendar(@$state->filter_date_to, "filter_date_to", "filter_date_to", '%Y-%m-%d %H:%M:%S'); ?> <input type="hidden" name="filter_datetype" value="created" /> </th> <th align="left" style="text-align: left;" class="key"> <?php $attribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => 'document.adminForm.submit();'); echo TiendaSelect::orderstate(@$state->filter_orderstate, 'filter_orderstate', $attribs, 'order_state_id', true); ?> </th> </tr> </thead> </table> </div>
$row = @$this->row; $helper_product = new TiendaHelperProduct(); ?> <div style="width: 100%;"> <div class="well options"> <legend> <?php echo JText::_('COM_TIENDA_ADD_NEW_RELATIONSHIP'); ?> </legend> <div id="new_relationship" class="dsc-wrap dsc-table"> <div class="dsc-row"> <div class="dsc-cell"> <?php echo TiendaSelect::relationship('', 'new_relationship_type'); ?> </div> <div class="dsc-cell"> <?php DSCModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/models'); $model = DSCModel::getInstance('ElementProduct', 'TiendaModel'); echo $model->fetchElement('new_relationship_productid_to'); echo $model->clearElement('new_relationship_productid_to'); //<input name="new_relationship_productid_to" size="15" type="text" /> ?> <input name="new_relationship_productid_from" value="<?php echo @$row->product_id; ?> " type="hidden" />
echo JRoute::_(@$form['action'] . $tmpl); ?> " method="post" name="adminForm" enctype="multipart/form-data"> <?php echo TiendaGrid::pagetooltip(JRequest::getVar('view')); ?> <table> <tr> <td align="left" width="100%"> <?php $attribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => "document.getElementById('task').value=this.options[this.selectedIndex].value; document.adminForm.submit();"); ?> <?php echo TiendaSelect::addressaction('', 'apply_action', $attribs, 'apply_action', true, false, 'COM_TIENDA_SELECT_ACTION'); ?> </td> <td nowrap="nowrap"> <a href="<?php echo JRoute::_("index.php?option=com_tienda&view=addresses&task=edit" . $tmpl); ?> "> <?php echo JText::_('COM_TIENDA_ENTER_A_NEW_ADDRESS'); ?> </a> </td> </tr> </table>
size="25" maxlength="250" value="<?php echo @$row->fax; ?> " /> </td> </tr> <tr> <th style="width: 100px; text-align: right;" class="key"> <?php echo JText::_('COM_TIENDA_EMAIL_FORMAT'); ?> </th> <td> <?php echo TiendaSelect::booleans(@$row->html_emails, 'html_emails', '', '', '', '', JText::_('COM_TIENDA_HTML'), JText::_('COM_TIENDA_PLAIN_TEXT')); ?> </td> </tr> </tbody> </table> <input type="button" onclick="tiendaSubmitForm('save');" value="<?php echo JText::_('COM_TIENDA_SUBMIT'); ?> " /> <input type="hidden" name="id" value="<?php echo @$row->user_id; ?> " />
<?php echo TiendaHelperProduct::getRatingImage(@$row->productcomment_rating, $this); ?> <input type="hidden" id="productcomment_rating" name="productcomment_rating" value="<?php echo @$row->productcomment_rating; ?> " size="10" /> </td> </tr> <tr> <td style="width: 100px; text-align: right;" class="key"> <?php echo JText::_('COM_TIENDA_PUBLISHED'); ?> : </td> <td> <?php echo TiendaSelect::btbooleanlist('productcomment_enabled', '', @$row->productcomment_enabled); ?> </td> </tr> </table> <input type="hidden" name="id" value="<?php echo @$row->manufacturer_id; ?> " /> <input type="hidden" name="task" value="" /> </form>
?> <div class="rightAlignDiv"> <?php if ($review_enable == 1 && $count > 0) { ?> <form name="sortForm" method="post" action="<?php echo JRoute::_($url); ?> "> <?php echo JText::_('COM_TIENDA_SORT_BY'); ?> : <?php echo TiendaSelect::selectsort($selectsort, 'default_selectsort', array('class' => 'inputbox', 'size' => '1', 'onchange' => 'document.sortForm.submit();')); ?> </form> <?php } ?> </div> </div> <div id="new_review_form" class="rowPaddingDiv" style="display: none;"> <div id="validationmessage_comments" style="padding-top: 10px;"></div> <form action="<?php echo $click; ?> " method="post" class="adminform" name="commentsForm" enctype="multipart/form-data" > <div><?php
</th> <th style="text-align: left;"> <input id="filter_name" name="filter_name" value="<?php echo @$state->filter_name; ?> " size="25"/> </th> <th> <input id="filter_code" name="filter_code" value="<?php echo @$state->filter_code; ?> " size="15"/> </th> <th> <?php echo TiendaSelect::country(@$state->filter_countryid, 'filter_countryid', $attribs, 'country_id', 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>
?> <form action="<?php echo JRoute::_("&limitstart=" . @$state->limitstart); ?> " method="post" name="adminForm_sort" enctype="multipart/form-data"> <div class="tienda_sortby"> <?php Tienda::load('TiendaSelect', 'libray.select'); ?> <span class="sort_by_label"> <?php echo JText::_('COM_TIENDA_SORT_BY'); ?> </span> <?php echo TiendaSelect::productsortby(@$state->filter_sortby, 'filter_sortby', array('onchange' => 'document.adminForm_sort.submit();'), 'filter_sortby', true, JText::_('COM_TIENDA_DEFAULT_ORDER')); ?> <span class="sort_by_direction"> <?php if (strtolower(@$state->filter_dir) == 'asc') { $dir = 'desc'; $img_dir = 'arrow_down.png'; } else { $dir = 'asc'; $img_dir = 'arrow_up.png'; } ?> <a href="<?php echo JRoute::_("&limitstart=" . $state->limitstart . "&filter_sortby=" . $state->filter_sortby . "&filter_dir=" . $dir); ?>
<?php echo TiendaGrid::required(); ?> <?php } ?> </label> <?php $url = "index.php?option=com_tienda&format=raw&controller=checkout&task=getzones&prefix={$this->form_prefix}&country_id="; $onchange = 'tiendaPutAjaxLoader( \'' . $this->form_prefix . 'zones_wrapper\' );tiendaDoTask( \'' . $url . '\'+document.getElementById(\'' . $this->form_prefix . 'country_id\').value, \'' . $this->form_prefix . 'zones_wrapper\', \'\', \'\', false, function() {tiendaCheckoutAutomaticShippingRatesUpdate( \'' . $this->form_prefix . 'country_id\' ); });'; if ($one_page) { $onchange = 'tiendaPutAjaxLoader( \'' . $this->form_prefix . 'zones_wrapper\' );' . 'tiendaDoTask( \'' . $url . '\'+document.getElementById(\'' . $this->form_prefix . 'country_id\').value, \'' . $this->form_prefix . 'zones_wrapper\', \'\', \'\', false, ' . 'function() {tiendaCheckoutAutomaticShippingRatesUpdate( \'' . $this->form_prefix . 'country_id\' ); ' . ' });'; } $attribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => $onchange); echo TiendaSelect::country($this->default_country_id, $this->form_prefix . 'country_id', $attribs, $this->form_prefix . 'country_id', false, true); ?> </div> <?php } ?> <?php if ($elements['city'][0]) { ?> <div> <label class="key" for="<?php echo $this->form_prefix; ?> city"> <?php
<td style="width: 150px;"><?php echo TiendaSelect::btbooleanlist('show_manufacturer_productcompare', 'class="inputbox"', $this->row->get('show_manufacturer_productcompare', '1')); ?> </td> <td></td> </tr> <tr> <th style="width: 25%;"><?php echo JText::_('COM_TIENDA_SHOW_PRODUCT_MODEL'); ?> </th> <td style="width: 150px;"><?php echo TiendaSelect::btbooleanlist('show_model_productcompare', 'class="inputbox"', $this->row->get('show_model_productcompare', '1')); ?> </td> <td></td> </tr> <tr> <th style="width: 25%;"><?php echo JText::_('COM_TIENDA_SHOW_PRODUCT_SKU'); ?> </th> <td style="width: 150px;"><?php echo TiendaSelect::btbooleanlist('show_sku_productcompare', 'class="inputbox"', $this->row->get('show_sku_productcompare', '1')); ?> </td> <td></td> </tr> </tbody> </table>
defined('_JEXEC') or die('Restricted access'); $state = @$this->state; $rows = @$this->get('List'); $form = @$this->form; JHTML::_('behavior.modal'); JHTML::_('behavior.tooltip'); $model = $this->getModel(); $page = $this->get('Pagination'); ?> <form action="<?php echo JRoute::_(@$form['action'] . '&tmpl=component&object=' . $this->object); ?> " method="post" name="adminForm"> <div class="pull-left"> <?php echo TiendaSelect::productstates(@$state->filter_state, 'product_state', array('class' => 'inputbox', 'onchange' => 'this.form.submit();')); ?> </div> <?php echo TiendaGrid::searchform(@$state->filter, JText::_('COM_TIENDA_SEARCH'), JText::_('COM_TIENDA_RESET')); ?> <table class="dsc-clear table table-striped"> <thead> <tr> <th width="2%" class="title"> <?php echo DSCGrid::sort('ID', 'tbl.product_id', @$state->direction, @$state->order); ?> </th> <th style="width:50px;">
<td> <?php echo TiendaSelect::btbooleanlist('credit_enabled', '', @$row->credit_enabled); ?> </td> </tr> <tr> <td style="width: 100px; text-align: right;" class="key"> <?php echo JText::_('COM_TIENDA_CAN_BE_WITHDRAWN'); ?> : </td> <td> <?php echo TiendaSelect::btbooleanlist('credit_withdrawable', '', @$row->credit_withdrawable); ?> </td> </tr> <tr> <td title="<?php echo JText::_('COM_TIENDA_CREDIT_CODE') . '::' . JText::_('COM_TIENDA_CREDIT_CODE_TIP'); ?> " class="key hasTip" style="width: 100px; text-align: right;"> <?php echo JText::_('COM_TIENDA_CODE'); ?> : </td> <td> <input name="credit_code" type="text" size="40" value="<?php
<?php 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_TIENDA_LOW_STOCK_NOTIFY'); ?> </th> <td><?php echo TiendaSelect::btbooleanlist('low_stock_notify', 'class="inputbox"', $this->row->get('low_stock_notify', '0')); ?> </td> <td></td> </tr> <tr> <th style="width: 25%;"><?php echo JText::_('COM_TIENDA_LOW_STOCK_NOTIFY_VALUE'); ?> </th> <td><input ="text" name="low_stock_notify_value" value="<?php echo $this->row->get('low_stock_notify_value', '0'); ?> " /> </td> <td><?php echo JText::_('COM_TIENDA_LOW_STOCK_NOTIFY_VALUE_DESC');
:</td> <td><input name="ordering" id="ordering" value="<?php echo @$row->ordering; ?> " size="10" maxlength="250" type="text" /> </td> </tr> <tr> <td width="100" align="right" class="key"><label for="currency_enabled"> <?php echo JText::_('COM_TIENDA_ENABLED'); ?> : </label> </td> <td><?php echo TiendaSelect::btbooleanlist('enabled', '', @$row->enabled); ?> </td> </tr> </table> <legend> <?php echo JText::_('COM_TIENDA_PARAMETERS'); ?> </legend> <?php $path = JPATH_SITE . '/plugins/' . $row->folder . '/' . $row->element . '/jform/' . $row->element . '.xml'; if (file_exists($path)) { $form = JForm::getInstance($row->element, $path);
" size="10" maxlength="250" type="text" /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="currency_enabled"> <?php echo JText::_('COM_TIENDA_ENABLED'); ?> : </label> </td> <td> <?php echo TiendaSelect::btbooleanlist('published', '', @$row->published); ?> </td> </tr> </table> </fieldset> <fieldset> <legend><?php echo JText::_('COM_TIENDA_PARAMETERS'); ?> </legend> <?php if ($output = $this->params->render('params')) { echo $output; } else { echo "<div style=\"text-align: center; padding: 5px; \">" . JText::_('COM_TIENDA_THERE_ARE_NO_PARAMETERS_FOR_THIS_ITEM') . "</div>";
echo JText::_('COM_TIENDA_CONFIG_PROCESS_CONTENT_PLUGIN_PRODUCT_DESC'); ?> </th> <td><?php echo TiendaSelect::btbooleanlist('content_plugins_product_desc', 'class="inputbox"', $this->row->get('content_plugins_product_desc', '0')); ?> </td> <td></td> </tr> <tr> <th style="width: 25%;"><?php echo JText::_('COM_TIENDA_SHOW_DIOSCOURI_LINK_IN_FOOTER'); ?> </th> <td><?php echo TiendaSelect::btbooleanlist('show_linkback', 'class="inputbox"', $this->row->get('show_linkback', '1')); ?> </td> <td></td> </tr> <tr> <th style="width: 25%;"><?php echo JText::_('COM_TIENDA_YOUR_DIOSCOURI_AFFILIATE_ID'); ?> </th> <td><input type="text" name="amigosid" value="<?php echo $this->row->get('amigosid', ''); ?> " class="inputbox" /> </td> <td><a href='http://www.dioscouri.com/' target='_blank'> <?php
<div id="productSearch"> <form action="<?php echo JRoute::_('index.php', false); ?> " method="post" name="productSearch" onSubmit="if(this.elements['filter'].value == '<?php echo JText::_('COM_TIENDA_SKU_MODEL_OR_KEYWORD'); ?> ') this.elements['filter'].value = '';"> <?php echo JText::_('COM_TIENDA_SEARCH') . ': '; ?> <?php if ($category_filter != '0') { ?> <?php echo TiendaSelect::category('', 'filter_category', '', '', false, false, 'All Categories', '', '1'); ?> <?php } else { ?> <input type="hidden" name="filter_category" value="1" /> <?php } ?> <input type="text" name="filter" value="<?php echo JText::_($filter_text); ?> " onclick="this.value='';"/> <input type="submit" value="<?php echo JText::_('COM_TIENDA_SUBMIT'); ?>
<input type="text" name="ordering[<?php echo $item->productfile_id; ?> ]" value="<?php echo $item->ordering; ?> " size="10" /> </td> <td style="text-align: center;"> <?php echo TiendaSelect::btbooleanlist("purchaserequired[" . $item->productfile_id . "]", '', $item->purchase_required); ?> </td> <td style="text-align: center;"> <?php echo TiendaSelect::btbooleanlist("enabled[" . $item->productfile_id . "]", '', $item->productfile_enabled); ?> </td> <td style="text-align: center;"> <input type="text" name="max_download[<?php echo $item->productfile_id; ?> ]" value="<?php echo $item->max_download; ?> " size="10" /> </td> <td style="text-align: center;"> [<a href="index.php?option=com_tienda&controller=productfiles&task=delete&cid[]=<?php echo $item->productfile_id; ?>
<?php if (empty($this->shipping_address)) { ?> <div> <input id="sameasbilling" name="sameasbilling" type="checkbox" checked="checked" onclick="tiendaShowHideDiv( 'shipping_input_addressForm' ); tiendaGetShippingRates( 'onCheckoutShipping_wrapper', document.adminForm ); tiendaGetPaymentOptions( 'onCheckoutPayment_wrapper', document.adminForm ); "/> <?php echo JText::_('COM_TIENDA_SAME_AS_BILLING_ADDRESS'); ?> </div> <?php } ?> <?php $shipattribs = array('class' => 'inputbox', 'size' => '1', 'onchange' => "tiendaCheckoutSetShippingAddress('{$baseurl}'+this.options[this.selectedIndex].value, 'shippingDefaultAddress', this.form, this.options[this.selectedIndex].value ); "); // display select list of stored addresses echo TiendaSelect::address(JFactory::getUser()->id, @$this->shipping_address->address_id, 'shipping_address_id', 2, $shipattribs, 'shipping_address_id', false, true); ?> <div id="shippingDefaultAddress"> <?php if (!empty($this->shipping_address)) { echo $this->shipping_address->title . " " . $this->shipping_address->first_name . " " . $this->shipping_address->last_name . "<br>"; echo $this->shipping_address->company . "<br>"; echo $this->shipping_address->address_1 . " " . $this->shipping_address->address_2 . "<br>"; echo $this->shipping_address->city . ", " . $this->shipping_address->zone_name . " " . $this->shipping_address->postal_code . "<br>"; echo $this->shipping_address->country_name . "<br>"; } ?> </div> <?php echo @$this->shipping_address_form; ?>