diff --git a/src/ImportCsvShopContentHandler.php b/src/ImportCsvShopContentHandler.php index 9cb5cb8..1d3dd78 100644 --- a/src/ImportCsvShopContentHandler.php +++ b/src/ImportCsvShopContentHandler.php @@ -26,7 +26,7 @@ use yii\widgets\ActiveForm; /** - * @property ShopStore $shopStore + * @property ShopStore $shopStore * * @author Semenov Alexander */ @@ -138,11 +138,9 @@ public function renderConfigForm(ActiveForm $form) } echo $form->field($this, 'content_id')->listBox( - ArrayHelper::merge(['' => ' - '], CmsContent::getDataForSelect(true, function (ActiveQuery $activeQuery) { - $activeQuery->andWhere([ - 'id' => \yii\helpers\ArrayHelper::map(\skeeks\cms\shop\models\ShopContent::find()->all(), 'content_id', 'content_id'), - ]); - })), [ + ArrayHelper::merge(['' => ' - '], [ + \Yii::$app->shop->contentProducts->id => \Yii::$app->shop->contentProducts->name + ]), [ 'size' => 1, 'data-form-reload' => 'true', ]); @@ -422,7 +420,6 @@ public function import($number, $row) } - if ($this->is_save_source_data) { $data = $this->getRowDataWithHeaders($row); $shopProductIsUpdate = true; @@ -478,7 +475,6 @@ public function import($number, $row) unset($element); - return $result; }