示例#1
0
 public function ActionDetail()
 {
     $this->pageTitle = Yii::app()->name . '-订单详情';
     $orderid = Yii::app()->request->getParam('orderid');
     $organID = Yii::app()->user->getOrganID();
     //获取订单信息及商品信息
     $model = PapOrder::model()->findByPk($orderid, "BuyerID={$organID}");
     if (!$model) {
         $this->redirect(array('index'));
     }
     $order['order'] = $model->attributes;
     $discount = PapOrderDiscount::model()->find(array("condition" => "OrderType = {$order['order']['OrderType']}"));
     $order['discount'] = $discount->attributes;
     foreach ($model->goodsinfo as $k => $v) {
         $order['goodsList'][$k] = self::getVersionGoods($v);
     }
     //获取收货地址
     $address = OrderService::getship($orderid);
     //获取卖家信息
     $dealer = OrderService::getSeller($orderid);
     //支付宝帐号
     // $account = OrderService::getPayaccount();
     //获取活动信息
     $huodong = OrderService::getHuodong($orderid);
     $this->render('detail', array('order' => $order, 'address' => $address, 'dealer' => $dealer, 'huodong' => $huodong));
 }