當前位置: 首頁>>代碼示例>>PHP>>正文


PHP shipping::getShippingMethodById方法代碼示例

本文整理匯總了PHP中shipping::getShippingMethodById方法的典型用法代碼示例。如果您正苦於以下問題:PHP shipping::getShippingMethodById方法的具體用法?PHP shipping::getShippingMethodById怎麽用?PHP shipping::getShippingMethodById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在shipping的用法示例。


在下文中一共展示了shipping::getShippingMethodById方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: display

 public function display($tpl = null)
 {
     $context = 'shipping_rate';
     $uri = JFactory::getURI();
     $app = JFactory::getApplication();
     $document = JFactory::getDocument();
     $shippinghelper = new shipping();
     $lists['order'] = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'shipping_rate_id');
     $lists['order_Dir'] = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '');
     $id = $app->getUserStateFromRequest($context . 'extension_id', 'extension_id', '0');
     if ((int) $id == 0) {
         JError::raiseError(500, "Direct Access not allowed, go to <a href='index.php?option=com_redshop&view=shipping'>" . JText::_('COM_REDSHOP_SHIPPING') . "</a>");
         return false;
     }
     $shipping = $shippinghelper->getShippingMethodById($id);
     $shipping_rates = $this->get('Data');
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     $shippingpath = JPATH_ROOT . '/plugins/' . $shipping->folder . '/' . $shipping->element . '.xml';
     $myparams = new JRegistry($shipping->params, $shippingpath);
     $is_shipper = $myparams->get('is_shipper');
     $shipper_location = $myparams->get('shipper_location');
     $jtitle = $shipper_location ? JText::_('COM_REDSHOP_SHIPPING_LOCATION') : JText::_('COM_REDSHOP_SHIPPING_RATE');
     JToolBarHelper::title($jtitle . ' <small><small>[ ' . $shipping->name . ' ]</small></small>', 'redshop_shipping_rates48');
     JToolBarHelper::addNewX();
     JToolBarHelper::editListX();
     if ($is_shipper) {
         JToolBarHelper::customX('copy', 'copy.png', 'copy_f2.png', JText::_('COM_REDSHOP_TOOLBAR_COPY'), true);
     }
     JToolBarHelper::deleteList();
     JToolBarHelper::cancel('cancel', JText::_('JTOOLBAR_CLOSE'));
     $this->lists = $lists;
     $this->shipping_rates = $shipping_rates;
     $this->shipping = $shipping;
     $this->pagination = $pagination;
     $this->is_shipper = $is_shipper;
     $this->shipper_location = $shipper_location;
     $this->request_url = $uri->toString();
     parent::display($tpl);
 }
開發者ID:,項目名稱:,代碼行數:40,代碼來源:


注:本文中的shipping::getShippingMethodById方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。