Beispiel #1
0
<?php

/* @var $this ProductController */
Yii::app()->clientScript->registerCssFile('../css/order.css');
$orderPrice = 0;
$orderNum = 0;
$orderList = new OrderList($this->companyId, $this->siteNoId);
if ($orderList->order) {
    $orderProductList = $orderList->OrderProductList($orderList->order['lid'], 0, 0, 1);
    $price = $orderList->OrderPrice(0, 1);
    $priceArr = explode(':', $price);
    $orderPrice = $priceArr[0];
    $orderNum = $priceArr[1];
} else {
    $orderProductList = array();
}
//全单口味
$tasteIds = TasteClass::getOrderTaste($orderList->order['lid'], 1, $this->companyId);
?>
<script type="text/javascript" src="../js/product/taste.js"></script>
<form action="orderList?confirm=1&orderId=<?php 
echo $orderList->order['lid'];
?>
" method="post">
<div class="top"><?php 
echo yii::t('app', '我的订单');
?>
</div>
<div class="product-title"><?php 
echo yii::t('app', '订单已经被锁定,其他人不能修改,需要最终修改数量和口味点击');
?>
Beispiel #2
0
<?php

/* @var $this ProductController */
Yii::app()->clientScript->registerCssFile('../css/cartlist.css');
$orderPrice = 0;
$orderNum = 0;
$orderPricePay = 0;
$orderPayNum = 0;
$orderList = new OrderList($this->companyId, $this->siteNoId);
if ($orderList->order) {
    $orderProductList = $orderList->OrderProductList($orderList->order['lid'], 0, 1);
    $orderProductListPay = $orderList->OrderProductList($orderList->order['lid'], 1, 0, 1);
    $price = $orderList->OrderPrice(0, 1);
    $priceArr = explode(':', $price);
    $orderPrice = $priceArr[0];
    $orderNum = $priceArr[1];
    $pricePay = $orderList->OrderPrice(1, 0, 1);
    $pricePayArr = explode(':', $pricePay);
    $orderPricePay = $pricePayArr[0];
    $orderPayNum = $pricePayArr[1];
} else {
    $orderProductList = array();
    $orderProductListPay = array();
}
?>
<script type="text/javascript" src="../js/product/taste.js"></script>
	<div class="top"><a href="index"><div class="back"><img src="../img/product/back.png" /> <?php 
echo yii::t('app', '返回');
?>
</div></a><a id="order" href="javascript:;"><button class="create-order"><?php 
echo yii::t('app', '下单');
 public function actionGetOrderListJson()
 {
     $orderProductList = array();
     $orderList = new OrderList($this->companyId, $this->siteNoId);
     if ($orderList->order) {
         $orderProductList = $orderList->OrderProductList($orderList->order['lid'], 0, 1);
         foreach ($orderProductList as $key => $val) {
             $orderProductList[$key]['category_name'] = OrderList::GetCatoryName($key, $this->companyId);
             if (!$key) {
                 foreach ($val as $k => $v) {
                     $orderProductList[$key][$k]['product_id'] = ProductSetClass::GetProductSetProductIds($this->companyId, $v['set_id']);
                 }
             }
         }
     }
     Yii::app()->end(json_encode($orderProductList));
 }