本文整理汇总了PHP中shipping::listPrices方法的典型用法代码示例。如果您正苦于以下问题:PHP shipping::listPrices方法的具体用法?PHP shipping::listPrices怎么用?PHP shipping::listPrices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类shipping
的用法示例。
在下文中一共展示了shipping::listPrices方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: quickPay
function quickPay()
{
global $order, $user;
if ($order->shipping_required) {
redirect_to(array('controller' => 'cart', 'action' => 'checkout'));
}
if (empty($order->orderitem)) {
flashAndFlow('error', 'There are no items in your cart.');
}
// if we made it here it means that the item was add to the cart.
expHistory::set('viewable', $this->params);
// call each products checkout() callback & calculate total
foreach ($order->orderitem as $item) {
$product = new $item->product_type($item->product_id);
$product->checkout();
}
// setup the billing & shipping calculators info
if ($product->requiresBilling) {
$billing = new billing();
assign_to_template(array('billing' => $billing));
}
if ($product->requiresShipping) {
$shipping = new shipping();
$shipping->pricelist = $shipping->listPrices();
assign_to_template(array('shipping' => $shipping));
}
assign_to_template(array('product' => $product, 'user' => $user, 'order' => $order));
}
示例2: listPrices
function listPrices()
{
$shipping = new shipping();
$ar = new expAjaxReply(200, 'ok', $shipping->listPrices(), array('controller' => 'cart', 'action' => 'checkout'));
$ar->send();
}