public function add($productId, $count, $attributesAndValues = null, $additionalProducts = [], $combinationId = null)
    {
        if (!empty($attributesAndValues)) {
            $attributesAndValues = Json::decode($attributesAndValues);
        }

        if ($this->saveSelectedCombination) {
            $combination = Combination::findOne($combinationId) ?? $this->getCombination($attributesAndValues, $productId);
            $this->saveSelectedCombinationToSession($combination);
        }

        if ($this->saveToDataBase && !\Yii::$app->user->isGuest) {
            $this->saveProductToDataBase($productId, $count, $attributesAndValues, $additionalProducts, $combinationId);
        } else {
            $this->saveProductToSession($productId, $count, $attributesAndValues, $additionalProducts, $combinationId);
        }
        $this->trigger(self::EVENT_AFTER_ADD_PRODUCT);
    }