当前位置: 首页>>代码示例>>PHP>>正文


PHP Shipment::getShippersArray方法代码示例

本文整理汇总了PHP中Shipment::getShippersArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Shipment::getShippersArray方法的具体用法?PHP Shipment::getShippersArray怎么用?PHP Shipment::getShippersArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shipment的用法示例。


在下文中一共展示了Shipment::getShippersArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: view_settings_shipment

 /**
  * The shipment settings view
  */
 static function view_settings_shipment()
 {
     // start show shipment
     self::$objTemplate->addBlockfile('SHOP_SETTINGS_FILE', 'settings_block', 'module_shop_settings_shipment.html');
     self::$objTemplate->setGlobalVariable('SHOP_CURRENCY', Currency::getDefaultCurrencySymbol());
     $arrShipments = Shipment::getShipmentsArray();
     $i = 0;
     foreach (Shipment::getShippersArray() as $shipper_id => $arrShipper) {
         $zone_id = Zones::getZoneIdByShipperId($shipper_id);
         // Inner block first
         self::$objTemplate->setCurrentBlock('shopShipment');
         // Show all possible shipment conditions for each shipper
         if (isset($arrShipments[$shipper_id])) {
             foreach ($arrShipments[$shipper_id] as $shipment_id => $arrConditions) {
                 self::$objTemplate->setVariable(array('SHOP_SHIPMENT_STYLE' => 'row' . (++$i % 2 + 1), 'SHOP_SHIPPER_ID' => $shipper_id, 'SHOP_SHIPMENT_ID' => $shipment_id, 'SHOP_SHIPMENT_MAX_WEIGHT' => $arrConditions['max_weight'], 'SHOP_SHIPMENT_PRICE_FREE' => $arrConditions['free_from'], 'SHOP_SHIPMENT_COST' => $arrConditions['fee']));
                 //self::$objTemplate->parseCurrentBlock();
                 self::$objTemplate->parse('shopShipment');
             }
         }
         // Outer block
         self::$objTemplate->setCurrentBlock('shopShipper');
         self::$objTemplate->setVariable(array('SHOP_SHIPMENT_STYLE' => 'row' . (++$i % 2 + 1), 'SHOP_SHIPPER_ID' => $shipper_id, 'SHOP_SHIPPER_NAME' => \Html::getInputText('shipper_name[' . $shipper_id . ']', $arrShipper['name']), 'SHOP_ZONE_SELECTION' => Zones::getMenu($zone_id, 'zone_id[' . $shipper_id . ']'), 'SHOP_SHIPPER_STATUS' => $arrShipper['active'] ? \Html::ATTRIBUTE_CHECKED : ''));
         self::$objTemplate->parse('shopShipper');
     }
     self::$objTemplate->setVariable('SHOP_ZONE_SELECTION_NEW', Zones::getMenu(0, 'zone_id_new'));
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:29,代码来源:ShopManager.class.php


注:本文中的Shipment::getShippersArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。