$model = Order::find()->with(['productOrder.product'])->one();
foreach ($model->productOrder as $item) {
echo 'Имя ' . $item->product->name . PHP_EOL;
echo 'Цена ' . $item->price . PHP_EOL;
echo 'Кол-во ' . $item->quantity . PHP_EOL;
echo 'Сумма ' . $item->price * $item->quantity . PHP_EOL;
}
sql_db = project
sql_port = 3306 #optional, default is 3306
{
listen = 9312
listen = 9306:mysql41
}
c:\sphinx3\bin\indexer --config c:\sphinx3\sphinx.conf --all
c:\sphinx3\bin\indexer --config c:\sphinx3\sphinx.conf --rotate --all
$basketArr = Baskets::str2arr($this->basket);
foreach ($basketArr as $sku => $amount) {
$query->andFilterWhere(['OR',
['LIKE', Baskets::tableName() . '.amount', $amount],
['LIKE', Baskets::tableName() . '.sku', $sku]
]);
}
[['attachment'], 'file', 'skipOnEmpty' => false, 'extensions' => 'png, jpg, xls, docx, pdf'],
[['attachment'], 'required']
,<?= $form->field($imageModel, 'attachment')->fileInput() ?>