Browse Source

confirm order

Charlie 8 năm trước cách đây
mục cha
commit
6aee14818a

+ 2 - 3
www/protected/modules/o2o/controllers/OrderController.php

@@ -17,9 +17,8 @@ class  OrderController extends O2oBaseController{
         $order_channel = Yii::app()->getRequest()->getParam("order_channel");
 
         $counts = Yii::app()->request->getParam('counts', 1);
-        $extra =  Yii::app()->request->getParam('extra',array());
-        $extra = json_decode($extra);
-
+        $extra = json_decode(Yii::app()->getRequest()->getParam("extra","[]"),true);
+var_dump($extra);exit;
         $balance = floatval(Yii::app()->getRequest()->getParam("balance",0));//余额支付的金额
 
         //CommonFn::requestAjax(false,'系统升级中,暂时不能下单');

+ 2 - 2
www/protected/modules/o2o/models/Product.php

@@ -14,7 +14,7 @@ class Product extends MongoAr
     public $desc;//图文介绍   json格式  [{  // 图文详情"type": 1,  //  1: 图片url, 2: 纯文本 "content": "http://a.big.jpg"}, {"type": 1,"content": "http://b.big.jpg"}, {"type": 2,"content": "描述文案..."},  // ... ]
     public $pics=array();//七牛的地址  array('url'=>'http://xxx.qiniudn.com/1414476356856.jpg','height'=>1180,'width'=>2340)
 
-    public $price;//商品的单价  单位:元
+    public $price=0;//商品的单价  单位:元
 
     public $extra=array();//array('types'=>array(array('type'=>'一室一卫','price'=>180),array('type'=>'二室一卫','price'=>280)))
 
@@ -54,7 +54,7 @@ class Product extends MongoAr
     public function parseRow($row,$output=array()){
         $newRow = array();
         $newRow['id'] = (string)$row['_id'];
-        $newRow['price'] = CommonFn::get_val_if_isset($row,'price',100);
+        $newRow['price'] = CommonFn::get_val_if_isset($row,'price',0);
 
         $newRow['name'] = CommonFn::get_val_if_isset($row,'name','');
         $newRow['desc'] = CommonFn::get_val_if_isset($row,'desc','');