src/ShoppingCart.php
public function setSerialized($serialized)
    {
        try {
            parent::setSerialized($serialized);
        } catch (\Exception $e) {
            Yii::error('Failed to unserlialize cart: ' . $e->getMessage(), __METHOD__);
            $this->_positions = [];
            $this->saveToSession();
        }
    }
public function setSerialized($serialized)
    {
        try {
            parent::setSerialized($serialized);
        } catch (\Exception $e) {
            Yii::error('Failed to unserlialize cart: ' . $e->getMessage(), __METHOD__);
            $this->_positions = [];
            $this->saveToSession();
        }
    }
public function setSerialized ( $ serialized ) { try { parent :: setSerialized ( $ serialized ) ; } catch ( \ Exception $ e ) { Yii :: error ( 'Failed to unserlialize cart: ' . $ e -> getMessage ( ) , __METHOD__ ) ; $ this -> _positions = [ ] ; $ this -> saveToSession ( ) ; } }
Sets cart from serialized string
@param string $serialized
Sets cart from serialized string