本文整理匯總了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();
}