本文整理汇总了PHP中Basket::getOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP Basket::getOrder方法的具体用法?PHP Basket::getOrder怎么用?PHP Basket::getOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Basket
的用法示例。
在下文中一共展示了Basket::getOrder方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: basket
function basket()
{
if ($_POST) {
$basket = new Basket();
$basket->toOrder();
$this->redirect('/cabinet/basket/thanks/');
} else {
if (Funcs::$uri[2] == 'delivery') {
$seo['seo_title'] = 'Условия доставки';
Funcs::setMeta($seo);
$basket = new Basket();
$data['order'] = $basket->getOrder();
$data['delivery'] = $basket->getDelivery($data['order']);
View::render('cabinet/delivery', $data);
} elseif (Funcs::$uri[2] == 'thanks') {
$seo['seo_title'] = 'Благодарим вас за заказ!';
Funcs::setMeta($seo);
View::render('basket/thanks');
} else {
$data['seo_title'] = 'Корзина';
Funcs::setMeta($data);
$basket = new Basket();
$data['order'] = $basket->getOrder();
//$data['delivery']=$basket->getDelivery($data['order']);
//$data['payment']=$basket->getOrder($data['order']);
View::render('cabinet/basket', $data);
}
}
}
示例2: purchase
public function purchase()
{
if ($_POST) {
$basket = new Basket();
$basket->setPurchase();
$this->redirect('/basket/finish/');
} else {
$tree['seo_title'] = $tree['seo_keywords'] = $tree['seo_description'] = 'Ваши данные';
Funcs::setMeta($tree);
$basket = new Basket();
$tree['order'] = $basket->getOrder();
View::render('basket/purchase', $tree);
}
}
示例3: getBasket
public static function getBasket()
{
print View::getRenderEmpty('basket/basketinc', Basket::getOrder());
}
示例4: getParcel
public static function getParcel($what, $orderid = 0)
{
$data = array('volume' => 0, 'weight' => 0, 'height' => 0, 'width' => 0, 'length' => 0);
if ($what == 'site') {
$order = Basket::getOrder();
$arrField = 'goods';
$data = array('volume' => 0, 'weight' => 0);
foreach ($order[$arrField] as $item) {
if ($item['set'] == true) {
foreach ($item['goods'] as $goods) {
$temp = Catalog::getArticle($goods['sizeId']);
$data['volume'] += $temp['height'] * $temp['width'] * $temp['length'];
$data['weight'] += $temp['weight'];
if ($temp['width'] > $data['width']) {
$data['width'] = $temp['width'];
}
if ($temp['length'] > $data['length']) {
$data['length'] = $temp['length'];
}
$data['height'] += $temp['height'];
}
} else {
$temp = Catalog::getArticle($item['sizeId']);
$data['volume'] += $temp['height'] * $temp['width'] * $temp['length'];
$data['weight'] += $temp['weight'];
if ($temp['width'] > $data['width']) {
$data['width'] = $temp['width'];
}
if ($temp['length'] > $data['length']) {
$data['length'] = $temp['length'];
}
$data['height'] += $temp['height'];
}
}
$data['volume'] = $data['volume'] / 1000000;
$data['weight'] = $data['weight'] / 1000;
$address = Region::getCity($_SESSION['iuser']['address'][0]['city']);
} else {
$order = Orders::getOrderById($orderid);
foreach ($order['goods'] as $item) {
$temp = Goods::getSizeByName($item['tree'], $item['size']);
$data['volume'] += $temp['height'] * $temp['width'] * $temp['length'];
$data['weight'] += $temp['weight'];
if ($temp['width'] > $data['width']) {
$data['width'] = $temp['width'];
}
if ($temp['length'] > $data['length']) {
$data['length'] = $temp['length'];
}
$data['height'] += $temp['height'];
}
$data['volume'] = $data['volume'] / 1000000;
$data['weight'] = $data['weight'] / 1000;
$address = IuserAddress::getCity($order['address']['city']);
}
return array('data' => $data, 'address' => $address);
}