use yii_app\records\MarketplaceStore;
use yii_app\records\PricesDynamic;
use yii_app\records\Products1c;
+use yii_app\records\ProductsClass;
use yii_app\services\MarketplaceService;
/**
public function actionCreateTestOrder()
{
$mp = Yii::$app->request->post('marketplace', null);
-
+ $marketPlaceClass = ProductsClass::find()
+ ->where(['tip' => [ProductsClass::MARKETPLACE]])->one();
$product = Products1c::find()
->where(['tip' => 'products', 'type' => 'Маркетплейсы'])
+ ->andWhere(['parent_id' => $marketPlaceClass->category_id])
->andWhere(['not', ['articule' => null]])
->orderBy('RANDOM()')
->one();