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


PHP Lookup::packaging_types方法代码示例

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


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

示例1: __construct

 public function __construct($options = array(), $module = false)
 {
     $this->types = array_keys(Lookup::packaging_types());
     if ($module !== false) {
         $this->module = $module;
     }
     $this->options = apply_filters('shopp_packager_options', $options, $module);
     // Set weight limit
     $weight_limit = shopp_setting('shipping_package_weight_limit');
     $defaults = array('wtl' => $weight_limit ? $weight_limit : 50, 'wl' => -1, 'hl' => -1, 'll' => -1);
     if (!isset($this->options['limits'])) {
         $this->options['limits'] = array();
     }
     $this->options['limits'] = array_merge($defaults, $this->options['limits']);
     // set packing behavior
     $this->pack = apply_filters('shopp_packager_type', isset($options['type']) && in_array($options['type'], $this->types) ? $options['type'] : $this->pack, $module);
     // register packagers
     foreach ($this->types as $pack) {
         add_action('shopp_packager_add_' . $pack, array(&$this, $pack . '_add'), 10, 2);
     }
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:21,代码来源:Shipping.php

示例2: _e

</label>
		</td>
	</tr>
	<?php 
$Shopp = Shopp::object();
if ($Shopp->Shipping->realtime) {
    ?>
	<tr>
		<th scope="row" valign="top"><label for="packaging"><?php 
    _e('Packaging', 'Shopp');
    ?>
</label></th>
		<td>
		<select name="settings[shipping_packaging]" id="packaging">
				<?php 
    echo menuoptions(Lookup::packaging_types(), shopp_setting('shipping_packaging'), true);
    ?>
		</select><br />
		<?php 
    _e('Determines packaging method used for real-time shipping quotes.', 'Shopp');
    ?>
</td>
	</tr>
	<tr>
		<th scope="row" valign="top"><label for="packaging"><?php 
    _e('Package Limit', 'Shopp');
    ?>
</label></th>
		<td>
		<select name="settings[shipping_package_weight_limit]" id="packaging_weight_limit">
				<?php 
开发者ID:forthrobot,项目名称:inuvik,代码行数:31,代码来源:shipping.php


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