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


PHP Basket::getOrder方法代码示例

本文整理汇总了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);
         }
     }
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:29,代码来源:CabinetController.php

示例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);
     }
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:14,代码来源:BasketController.php

示例3: getBasket

 public static function getBasket()
 {
     print View::getRenderEmpty('basket/basketinc', Basket::getOrder());
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:4,代码来源:BasketModel.php

示例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);
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:57,代码来源:DeliveryModel.php


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