Example #1
0
 function add($productInfo)
 {
     $product = new ModelProduct();
     $productItem = $product->getInfo($productInfo['id']);
     $info = array('id' => $productInfo['id'], 'product_name' => $productInfo['product_name'], 'attribute' => $productInfo['attribute'], 'price' => $productInfo['price'], 'sn' => $productItem['sn'], 'photoUrl' => CFG_URL . 'data/product/' . $productItem['photo'], 'number' => 1);
     $_SESSION['cartInfo'][$productInfo['id'] . '_' . $productInfo['attribute']] = $info;
 }