Authored by hf

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

... ... @@ -761,17 +761,18 @@ class ItemModel
foreach ($sizeInfo['washTipsBoList'] as $value) {
$material['wash'][] = array('name' => $value['caption'],'img' => $value['img']);
}
}
if (!empty($sizeInfo['productMaterialList'])) {
//商品材质[洗涤说明]
$material['detail'] = array();
if (!empty($sizeInfo['productMaterialList'])) {
foreach ($sizeInfo['productMaterialList'] as $value) {
$material['detail'][] = array(
'img' => $value['imageUrl'],
'name' => $value['caption'],
'enName' => $value['encaption'],
'text' => $value['remark']
);
}
foreach ($sizeInfo['productMaterialList'] as $value) {
$material['detail'][] = array(
'img' => $value['imageUrl'],
'name' => $value['caption'],
'enName' => $value['encaption'],
'text' => $value['remark']
);
}
}
return $material;
... ...
... ... @@ -510,7 +510,8 @@ class IndexController extends WebAction
$goodsType = $this->post('goodsType', 0);
$promotionId = $this->post('promotionId', 0);
$isEdit = $this->post('isEdit', 0);
$uid = $this->getUid(true);
//$uid = $this->getUid(true);
$uid = $this->getUid(false);
// 执行加入购物车操作
$result = CartModel::addToCart($productSku, $buyNumber, $goodsType, $isEdit, $promotionId, $uid, $shoppingKey);
... ...