0
如何在zend会话中添加产品?我收到的产品为数组在zend会话中存储产品
我尝试这一点,但不工作
A和如何ü采取其他操作本次会议...
日Thnx很多
public function incartAction(){
$this->_helper->_layout->disableLayout();
$id = $this->_getParam("id");
$name= $this->_getParam("name");
$price= $this->getParam("price");
$img = $this->_getParam("img");
$qty = $this->_getParam("qty");
$produs = array(
"id"=>$id,
"name"=>$name,
"price"=>$price,
"img"=>$img,
"qty"=>$qty
);
$produs_model = new Application_Model_DbTable_Produs;
$produs_model->updateProdusById($id, $qty);
$cart = new Zend_Session_Namespace("products");
$cart->products->$name= $product;
$this->view->assign("cart", $cart);
}
日Thnx家伙......我昨晚纠正我的错误,现在所有的罚款:) –
高兴如果你觉得有帮助,你可以[接受答案](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work)。 –