Authored by hf

code review by fei.hong: do fixes bug to shopping cart

@@ -761,17 +761,18 @@ class ItemModel @@ -761,17 +761,18 @@ class ItemModel
761 foreach ($sizeInfo['washTipsBoList'] as $value) { 761 foreach ($sizeInfo['washTipsBoList'] as $value) {
762 $material['wash'][] = array('name' => $value['caption'],'img' => $value['img']); 762 $material['wash'][] = array('name' => $value['caption'],'img' => $value['img']);
763 } 763 }
  764 + }
  765 +
  766 + if (!empty($sizeInfo['productMaterialList'])) {
764 //商品材质[洗涤说明] 767 //商品材质[洗涤说明]
765 $material['detail'] = array(); 768 $material['detail'] = array();
766 - if (!empty($sizeInfo['productMaterialList'])) {  
767 - foreach ($sizeInfo['productMaterialList'] as $value) {  
768 - $material['detail'][] = array(  
769 - 'img' => $value['imageUrl'],  
770 - 'name' => $value['caption'],  
771 - 'enName' => $value['encaption'],  
772 - 'text' => $value['remark']  
773 - );  
774 - } 769 + foreach ($sizeInfo['productMaterialList'] as $value) {
  770 + $material['detail'][] = array(
  771 + 'img' => $value['imageUrl'],
  772 + 'name' => $value['caption'],
  773 + 'enName' => $value['encaption'],
  774 + 'text' => $value['remark']
  775 + );
775 } 776 }
776 } 777 }
777 return $material; 778 return $material;
@@ -510,7 +510,8 @@ class IndexController extends WebAction @@ -510,7 +510,8 @@ class IndexController extends WebAction
510 $goodsType = $this->post('goodsType', 0); 510 $goodsType = $this->post('goodsType', 0);
511 $promotionId = $this->post('promotionId', 0); 511 $promotionId = $this->post('promotionId', 0);
512 $isEdit = $this->post('isEdit', 0); 512 $isEdit = $this->post('isEdit', 0);
513 - $uid = $this->getUid(true); 513 + //$uid = $this->getUid(true);
  514 + $uid = $this->getUid(false);
514 515
515 // 执行加入购物车操作 516 // 执行加入购物车操作
516 $result = CartModel::addToCart($productSku, $buyNumber, $goodsType, $isEdit, $promotionId, $uid, $shoppingKey); 517 $result = CartModel::addToCart($productSku, $buyNumber, $goodsType, $isEdit, $promotionId, $uid, $shoppingKey);