本文整理汇总了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'));
}