собственно лучше всего выложу лог
in /var/www/cremea.lc/vendor/omnilight/yii2-shopping-cart/ShoppingCart.php
public function getSerialized()
{
return serialize($this->_positions);//ошибка здесь
}
in /var/www/cremea.lc/vendor/omnilight/yii2-shopping-cart/ShoppingCart.php at line 120 – serialize(['a:2:{s:2:"id";i:96;s:6:"volume";s:8:"300 гр";}' => frontend\models\CartPosition])
public function getSerialized()
{
return serialize($this->_positions);//ошибка здесь
}
in /var/www/cremea.lc/vendor/omnilight/yii2-shopping-cart/ShoppingCart.php at line 79 – yz\shoppingcart\ShoppingCart::getSerialized()
public function saveToSession()
{
$this->session = Instance::ensure($this->session, Session::className());
$this->session[$this->cartId] = $this->getSerialized();// ошибка здесь
}
in /var/www/cremea.lc/frontend/widgets/cart/Cart.php at line 38 – yz\shoppingcart\ShoppingCart::put(frontend\models\CartPosition, 1)
$prise= Price::find()->where("price=".$post['Carts']['price'])->andWhere("product_id=".$post['productId'])->one();
$prises=$prise->price;
$volume=$prise->volume;
$country=$prise->countryid;
$cartPosition = new CartPosition($position->id, $prises, $country, $volume);
if ($position) {
\Yii::$app->cart->put($cartPosition, 1);//ошибка здесь
где я допустил ошибку не подскажите и в чем она ?