Ordinary.php
568 Bytes
<?php
/**
* 常规购物车
* User: ziy
* Date: 14-7-22
* Time: 下午5:01
*/
class YHMCart_Cart_Ordinary extends YHMCart_Cart_Abstract
{
/**
* 暂存购物车
* @param $productSku
* @param int $buyNumber
*/
function addCart($uid,$productSku, $buyNumber = 1,$last_price=0)
{
$cart=$this->hookOrders()->setUid($uid)->addProduct($productSku, $buyNumber,$last_price, $type="main_goods");;
//加入购物车前
$this->addPreDispatch($cart);
//添加购物车
$this->add($cart);
//加入购物车后
$this->addEndDispatch($cart);
}
}