diff --git a/common/modules/product/widgets/views/product_smart.php b/common/modules/product/widgets/views/product_smart.php index a835c17..906cbba 100755 --- a/common/modules/product/widgets/views/product_smart.php +++ b/common/modules/product/widgets/views/product_smart.php @@ -9,9 +9,7 @@ use yii\helpers\Url;
- - - +
@@ -43,8 +41,7 @@ use yii\helpers\Url;
есть на складе - - +
Код: variant->sku?> @@ -53,22 +50,11 @@ use yii\helpers\Url;
variant->price ?> грн -
+
- - variant->product_variant_id; ?> - - - - - - - - - - +
diff --git a/common/modules/product/widgets/views/products_block.php b/common/modules/product/widgets/views/products_block.php index cad58f2..865159b 100755 --- a/common/modules/product/widgets/views/products_block.php +++ b/common/modules/product/widgets/views/products_block.php @@ -1,44 +1,25 @@ + -
-
- - + + - -
- registerJs($js, View::POS_READY); - ?> + + + + + diff --git a/frontend/controllers/AjaxController.php b/frontend/controllers/AjaxController.php index 48ec1e7..9dc0e13 100755 --- a/frontend/controllers/AjaxController.php +++ b/frontend/controllers/AjaxController.php @@ -4,7 +4,7 @@ namespace frontend\controllers; use common\models\Feedback; use yii\web\Controller; - +use \common\modules\product\widgets\specialProducts; class AjaxController extends Controller { public function actionFeedback() { @@ -33,4 +33,17 @@ class AjaxController extends Controller $response->statusText = 'Empty request'; return ['error' => 'Empty request']; } + + + public function actionNew(){ + return specialProducts::widget(['type' => 'new']); + } + + public function actionTop(){ + return specialProducts::widget(['type' => 'top']); + } + + public function actionProm(){ + return specialProducts::widget(['type' => 'promo']); + } } \ No newline at end of file diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 779033e..73f1c5f 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -93,5 +93,4 @@ class SiteController extends Controller } - } diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php index 3c89425..51fc2cb 100755 --- a/frontend/views/catalog/product.php +++ b/frontend/views/catalog/product.php @@ -446,129 +446,136 @@ FlipclockAsset::register($this);
- - - ---> - - - - - - - - - - - - - - -variant->product_variant_id; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -variant->product_variant_id; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -variant->product_variant_id; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+

+ Коллекция светильников +

+ +
+
+
+
+ + +
+
+ Цена: + 25794.00 грн + +
+
+
+
+
+
+
+
+
+
+
+ + +
+
+ Цена: + 14330.40 грн + +
+
+
+
+
+
+
+
+
+
+
+ + +
+
+ Цена: + 8598.00 грн + +
+
+
+
+
+
+
+
+
+
+ +
+ */?> + + +

- Отзывы люстра Elstead FE/LEILA6 + Отзывы

- +
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
+ render('../partial/brand_list')?>
@@ -278,36 +248,18 @@
Статьи
diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php index e5d054b..a72d224 100755 --- a/frontend/views/site/index.php +++ b/frontend/views/site/index.php @@ -1,5 +1,7 @@ @@ -23,13 +25,41 @@
- - 'top'])?> - +
+
+ + +
+
+registerJs($js, View::POS_READY); +?> diff --git a/frontend/web/js/new_script.js b/frontend/web/js/new_script.js index 3908afd..4d671c8 100644 --- a/frontend/web/js/new_script.js +++ b/frontend/web/js/new_script.js @@ -79,7 +79,55 @@ $(document).ready(function () { $('.home-popular li a').click(function (e) { e.preventDefault(); $('.home-popular li a').parent().removeClass('active') - $(this).parent().addClass('active') + $(this).parent().addClass('active'); + var status = $(this).data('status') + switch (status) { + case 'new': + $.post( "/ajax/new",function( data ) { + $('.home-popular-slider').html(data); + $('#product_main_slider').owlCarousel({ + navigation:true, + navigationText: [], + responsiveClass: true, + loop:true, + items:4, + mouseDrag:false, + navSpeed:200, + + }) + }); + break; + case 'top': + $.post( "/ajax/top", function( data ) { + $('.home-popular-slider').html(data); + $('#product_main_slider').owlCarousel({ + navigation:true, + navigationText: [], + responsiveClass: true, + loop:true, + items:4, + mouseDrag:false, + navSpeed:200, + + }) + }); + break; + case 'prom': + $.post( "/ajax/prom", function( data ) { + $('.home-popular-slider').html(data); + $('#product_main_slider').owlCarousel({ + navigation:true, + navigationText: [], + responsiveClass: true, + loop:true, + items:4, + mouseDrag:false, + navSpeed:200, + + }) + }); + break; + } }) } -- libgit2 0.21.4