當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。