/** * save cart to session */ public function save() { $this->_user->setAttribute('cart_items', $this->_items, tpyCart::SESSION_NS); }