code review by fei.hong: do fixes bug to shopping cart
Showing
2 changed files
with
5 additions
and
3 deletions
@@ -761,9 +761,11 @@ class ItemModel | @@ -761,9 +761,11 @@ 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) { | 769 | foreach ($sizeInfo['productMaterialList'] as $value) { |
768 | $material['detail'][] = array( | 770 | $material['detail'][] = array( |
769 | 'img' => $value['imageUrl'], | 771 | 'img' => $value['imageUrl'], |
@@ -773,7 +775,6 @@ class ItemModel | @@ -773,7 +775,6 @@ class ItemModel | ||
773 | ); | 775 | ); |
774 | } | 776 | } |
775 | } | 777 | } |
776 | - } | ||
777 | return $material; | 778 | return $material; |
778 | } | 779 | } |
779 | 780 |
@@ -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); |
-
Please register or login to post a comment