public function actionUpdate($product_id, $quantity)
{
$product = Product::model()->findByPk($product_id);
if (!is_null($product)) {
$shoppingCart = Yii::app()->customer->getShoppingCart();
$shoppingCart->add($product->product_id, intval($quantity));
$this->redirect(array('index'));
}
}