diff --git a/frontend/controllers/GoodsController.php b/frontend/controllers/GoodsController.php index d0fe9c5..217b726 100644 --- a/frontend/controllers/GoodsController.php +++ b/frontend/controllers/GoodsController.php @@ -24,7 +24,10 @@ class GoodsController extends Controller { $provider = new SqlDataProvider([ 'sql' => $query, 'pagination' => false, - // 'params' => [':status' => 1], + 'params' => [':article' => '0092S40090', + ':brand' => 'BOSCH', + ':margin_id' => '1', + ':currency_id' => '1'], 'sort' => [ 'attributes' => [ 'box', @@ -110,19 +113,19 @@ from `w_details` `w_details_description`.`brand` = `w_details`.`BRAND` inner join `w_importers` on `w_importers`.`id` = `w_details`.`IMPORT_ID` and `w_importers`.`active` = 1 - inner join `w_margins` on `w_margins`.`id` = 1 + inner join `w_margins` on `w_margins`.`id` =:margin_id left join `w_margins_importers` on `w_margins_importers`.`importer_id` = `w_details`.`IMPORT_ID` and - `w_margins_importers`.`margin_id` = 1 + `w_margins_importers`.`margin_id`=:margin_id left join `w_margins_groups` on `w_margins_groups`.`importer_id` = `w_details`.`IMPORT_ID` and - `w_margins_groups`.`margin_id` = 1 and + `w_margins_groups`.`margin_id` =:margin_id and `w_margins_groups`.`group` = `w_details`.`group` - inner join `w_currency` on `w_currency`.`id` = 1 + inner join `w_currency` on `w_currency`.`id` =:currency_id inner join `w_currency` as `t` on `t`.`id` = `w_importers`.`currency_id` inner join `w_currency` as `default` on `default`.`is_default` = 1 left join `w_margins_groups` as `input_groups` on `input_groups`.`importer_id` = `w_details`.`IMPORT_ID` and `input_groups`.`margin_id` = 8 and `input_groups`.`group` = `w_details`.`group` -where `w_details`.`ARTICLE` = '0092S40090' and `w_details`.`BRAND` = 'BOSCH' and (`w_details`.`BOX` > 0 or `w_details`.`ADD_BOX`) +where `w_details`.`ARTICLE` =:article and `w_details`.`BRAND` =:brand and (`w_details`.`BOX` > 0 or `w_details`.`ADD_BOX`) MySQL; return $query; diff --git a/frontend/views/goods/index.php b/frontend/views/goods/index.php index 1bc5768..59e6140 100644 --- a/frontend/views/goods/index.php +++ b/frontend/views/goods/index.php @@ -1,8 +1,17 @@ [ + 'box' => ['label' => 'Наличие'], + 'delivery' => ['label' => 'Срок'], + 'price' => ['label' => 'Цена'], + ], +]); $this->registerCssFile('/css/BC2_catalog_zapchasti.css'); - $this->params['breadcrumbs'][] = $this->title; +\yii\widgets\Pjax::begin(); ?>
@@ -87,87 +96,18 @@ $this->params['breadcrumbs'][] = $this->title; Номер детали Описание - Наличие - Срок - Цена - - - - BOSH - 0 092 S30 120 - - - - 12V 88Ah 740A - - - - - - - - - - - - + + + - - - - -
-
- -
- - -
-
- -
-
- -
- - -
-
- -
link('box')?>link('delivery')?>link('price')?>
-
- -
- - -
-
- -
- - - - - - - -
3
3
3
- - - - - -
1 дн.
1 дн.
1 дн.
- - - - -
103.75
103.75
103.75
+ $dataProvider, + 'itemView'=>'one_item', + 'layout' => "{items}" + ] ); + ?> @@ -497,4 +437,8 @@ $this->params['breadcrumbs'][] = $this->title; $('.tovar_card').toggleClass('tovar_card_visible'); $('.table').toggleClass('table_height'); }); - \ No newline at end of file + + + \ No newline at end of file diff --git a/frontend/views/goods/index_origin.php b/frontend/views/goods/index_origin.php new file mode 100644 index 0000000..1bc5768 --- /dev/null +++ b/frontend/views/goods/index_origin.php @@ -0,0 +1,500 @@ +registerCssFile('/css/BC2_catalog_zapchasti.css'); + +$this->params['breadcrumbs'][] = $this->title; +?> + +
+ Италавто + + Расходные материалы + + Электрооборудование + + Акамуляторы(АКБ) + + Аккумулятор 0 092 S30 120: BOSCH + +

Аккумулятор 0 092 S30 120: BOSCH

+
+
+ + +

Укажите свой автомобиль + и мы предложим вам + еще Аккумуляторы (АКБ)

+
+ + + + +
+ +
+
+ +

+ У нас есть еще
+ 45 Аккумуляторы (АКБ)
+ Возможно что-то вам
+ подойдет +

+
+ + + + + + + + + + + +
+ + + +

0 092 S30 120: BOSCH

+

12V 88Ah 740A

+

Емкость, А/Ч: 88

+

Полярность: Правая (-/+)

+
+ +
+ + +
+
+

Скрыть карточку товара

+
+
+ +
+

12V 88Ah 740A Bosch 0092s30120

+

грн

+

$

+ + + + + + + + + + + + + + + + + + + + + +
ФирмаНомер деталиОписаниеНаличиеСрокЦена
BOSH0 092 S30 120 + + + 12V 88Ah 740A + + + + + + + + + + + + + + + + +
+
+ +
+ + +
+
+ +
+
+ +
+ + +
+
+ +
+
+ +
+ + +
+
+ +
+ +
+ + + + +
3
3
3
+
+ + + +
1 дн.
1 дн.
1 дн.
+ + + +
103.75
103.75
103.75
+ + +
+
+

Замены искомого производителя

+

грн

+

$

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ФирмаНомер деталиОписаниеНаличиеСрокЦена
BOSH0 092 S30 120 + + + 12V 88Ah 740A + + + + + + + + + + +
+
+ +
+ + +
+
+ +
+ +
31 дн.103.75
BOSH0 092 S30 120 + + + 12V 88Ah 740A + + + + + + + + + + + + + +
+
+ +
+ + +
+
+ +
+
+ +
+ + +
+
+ +
+ +
+ + + + + + + + + +
3
3
+ +
+ + + + + + + + + +
1 дн.
1 дн.
+
+ + + + + + + + + +
103.75
103.75
+
BOSH0 092 S30 120 + + + 12V 88Ah 740A + + + + + + + + + + +
+
+ +
+ + +
+
+ +
+ +
31 дн.103.75
BOSH0 092 S30 120 + + + 12V 88Ah 740A + + + + + + + + + + + +
+
+ +
+ + +
+
+ +
+ +
31 дн.103.75
BOSH0 092 S30 120 + + + 12V 88Ah 740A + + + + + + + + + + + + + +
+
+ +
+ + +
+
+ +
+
+ +
+ + +
+
+ +
+ +
+ + + + + + + + + +
3
3
+ +
+ + + + + + + + + +
1 дн.
1 дн.
+
+ + + + + + + + + +
103.75
103.75
+
+
+

В наличии на центральном складе ItalAuto, в Киеве

+
+
+
+ +
+ \ No newline at end of file diff --git a/frontend/views/goods/one_item.php b/frontend/views/goods/one_item.php index f492d31..729fd90 100644 --- a/frontend/views/goods/one_item.php +++ b/frontend/views/goods/one_item.php @@ -4,15 +4,13 @@ use \yii\helpers\Html; $this->registerCssFile('/css/BC2_catalog_zapchasti.css'); ?> - - - $model->brand - 0$model->article + + - $model->description + -- libgit2 0.21.4