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