/** * Display the view */ public function display($tpl = null) { $comquick2cartHelper = new comquick2cartHelper(); $zoneHelper = new zoneHelper(); // Check whether view is accessible to user if (!$zoneHelper->isUserAccessible()) { return; } $app = JFactory::getApplication(); $user = JFactory::getUser(); $this->state = $this->get('State'); $this->item = $this->get('Data'); $this->params = $app->getParams('com_quick2cart'); $this->form = $this->get('Form'); if (!empty($this->item->zone_id)) { $zoneDetail = $zoneHelper->getZoneDetail($this->item->zone_id); // Check whether user is authorized for this zone ? if (!empty($zoneDetail['store_id'])) { $status = $comquick2cartHelper->store_authorize('taxrateform_default', $zoneDetail['store_id']); if (!$status) { $zoneHelper->showUnauthorizedMsg(); return false; } } } // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } $this->_prepareDocument(); parent::display($tpl); }
if (!empty($shipFormData['ratelist'])) { $rateList = $shipFormData['ratelist']; foreach ($rateList as $rate) { $qtcRateId = $rate['rateId']; ?> <tr id="qtcRateId_<?php echo $rate['rateId']; ?> "> <td id="qtczoneTd_<?php echo $qtcRateId; ?> " > <?php if (!empty($rate['zone_id'])) { $zoneDetail = $zoneHelper->getZoneDetail($rate['zone_id']); echo $zoneDetail['name'] . ' <br/>[' . JText::_('PLG_QTC_DEFAULT_ZONESHIPPING_STORE') . ':' . $zoneDetail['title'] . ' ] '; } ?> </td> <?php if ($shipMethDetail['shipping_type'] != 3) { ?> <td id="qtcRangeTd_<?php echo $qtcRateId; ?> " > <?php echo $rate['rangeFrom']; echo " " . JText::_("PLG_QTC_DEFAULT_ZONESHIPPING_TO") . " ";