当前位置: 首页>>代码示例>>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;未经允许,请勿转载。