Commit 08ee790c76aad362c33707075cae8ec9b99f4ab0
1 parent
a4109272
-Views fail rolled back
Showing
4 changed files
with
178 additions
and
80 deletions
Show diff stats
common/modules/product/widgets/views/product_smart.php
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @var Product $product | |
| 3 | + * @var $product common\modules\product\models\Product | |
| 4 | 4 | */ |
| 5 | - use common\modules\product\models\Product; | |
| 6 | 5 | use yii\helpers\Html; |
| 7 | 6 | use yii\helpers\Url; |
| 8 | - | |
| 9 | 7 | ?> |
| 10 | - | |
| 11 | -<div class="catalog_item"> | |
| 8 | +<div class="catalog_item home_slider_it"> | |
| 12 | 9 | <div class="wrapper"> |
| 13 | - <div class="item_container"> | |
| 14 | - <div class="title"> | |
| 15 | - <?= Html::a($product->name, | |
| 16 | - [ | |
| 17 | - 'catalog/product', | |
| 18 | - 'product' => $product->alias, | |
| 19 | - ] | |
| 20 | - ) ?> | |
| 21 | - </div> | |
| 10 | + <div class="status_block-wr <?=$class?>"> | |
| 11 | + <?php | |
| 12 | + if($class == 'top'){ | |
| 13 | + print '<div class="staus_hit"></div>'; | |
| 14 | + } else if($class == 'new') { | |
| 15 | + print '<div class="staus_new"></div>'; | |
| 16 | + } else if($class == 'promo'){ | |
| 17 | + print '<div class="status_sale">Акция</div>'; | |
| 18 | + } | |
| 19 | + ?> | |
| 20 | + | |
| 21 | + | |
| 22 | + </div> | |
| 23 | + <div class="item_container" > | |
| 24 | + <input class="prodInfo" type="hidden" value="[]"> | |
| 25 | + | |
| 22 | 26 | <div class="img"> |
| 23 | - <a href="<?=Url::to([ | |
| 24 | - 'catalog/product', | |
| 25 | - 'product' => $product->alias, | |
| 26 | - ])?>"> | |
| 27 | - <?= \common\components\artboximage\ArtboxImageHelper::getImage( | |
| 28 | - $product->imageUrl, | |
| 29 | - 'list', | |
| 30 | - [ | |
| 31 | - 'alt' => $product->name, | |
| 32 | - 'title' => $product->name, | |
| 33 | - 'class' => 'selected', | |
| 34 | - 'itemprop' => 'image', | |
| 35 | - ] | |
| 36 | - ) ?> | |
| 27 | + <a class="btn-product-details" href="<?= Url::to([ | |
| 28 | + 'catalog/product', | |
| 29 | + 'product' => $product->alias | |
| 30 | + ]) ?>"> | |
| 31 | + <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->enabledVariants[ 0 ]->imageUrl, 'list', [ | |
| 32 | + 'alt' => $product->fullname . ' ' . $product->category->name, | |
| 33 | + 'title' => $product->fullname . ' ' . $product->category->name, | |
| 34 | + 'class' => 'selected' | |
| 35 | + ]) ?> | |
| 37 | 36 | </a> |
| 38 | - <div class="info_icons"> | |
| 39 | - <a href="#" class="btn btnBuy buy_button" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm" lang="5893">Купить светильник</a> | |
| 40 | - | |
| 41 | - <?php /* | |
| 42 | - <ul class="ul wishlike_block"> | |
| 43 | - <li class="compare"> | |
| 44 | - <a onclick="add2compare(); return false;" class="compare compare_text_link_5893" lang="5893" href="#">К сравнению</a> | |
| 45 | - <span class="icon"></span> | |
| 46 | - </li> | |
| 47 | - <li class="like"> | |
| 48 | - <a class="like like_text_link_5893" lang="5893" href="#">В избранное</a><span class="icon"></span> | |
| 49 | - </li> | |
| 50 | - </ul> | |
| 51 | - */ ?> | |
| 37 | + </div> | |
| 38 | + | |
| 39 | + <div class="style short-desc_wr"> | |
| 40 | + <div class="style title-name_"> | |
| 41 | + <a href="<?= Url::to([ | |
| 42 | + 'catalog/product', | |
| 43 | + 'product' => $product->alias | |
| 44 | + ]) ?>" title="<?= $product->fullname . ' ' . $product->category->name ?>"> | |
| 45 | + <p><span><?= $product->fullname ?></span></p> | |
| 46 | + <p><span><?= $product->category->name ?></span></p> | |
| 47 | + </a> | |
| 52 | 48 | |
| 53 | 49 | </div> |
| 54 | - </div> | |
| 55 | - <div class="price"> | |
| 56 | - <div class="dlexfduinxipi"> | |
| 57 | - Цена: | |
| 58 | - <span class="main"> <?php | |
| 59 | - echo \Yii::$app->formatter->asDecimal($product->variant->price); | |
| 60 | - ?> <span class="currency">грн</span> | |
| 61 | - </span> | |
| 50 | + <div class="style in_stock_wr"> | |
| 51 | + <div class="in_stock_"> | |
| 52 | + <span class="yes_stock">есть на складе</span> | |
| 53 | + | |
| 54 | + </div> | |
| 55 | + <div class="title-sku"> | |
| 56 | + <span>Код: <?=$product->variant->sku?></span> | |
| 57 | + </div> | |
| 58 | + </div> | |
| 59 | + | |
| 60 | + <div class="style price-basket-wr"> | |
| 61 | + <span class="currency_price"><?= $product->variant->price ?> грн</span> | |
| 62 | + <!-- <div class="price-basket"><a class="" href="#"></a></div>--> | |
| 62 | 63 | </div> |
| 63 | 64 | </div> |
| 64 | - <div class="additional_info params"> | |
| 65 | - </div> | |
| 66 | - <div class="opacity_bg"></div> | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 67 | 68 | </div> |
| 68 | 69 | </div> |
| 69 | 70 | -</div> |
| 71 | +</div> | |
| 70 | 72 | \ No newline at end of file | ... | ... |
common/modules/product/widgets/views/product_smart_similar.php
0 → 100755
| 1 | +<?php | |
| 2 | + /** | |
| 3 | + * @var Product $product | |
| 4 | + */ | |
| 5 | + use common\modules\product\models\Product; | |
| 6 | + use yii\helpers\Html; | |
| 7 | + use yii\helpers\Url; | |
| 8 | + | |
| 9 | +?> | |
| 10 | + | |
| 11 | +<div class="catalog_item"> | |
| 12 | + <div class="wrapper"> | |
| 13 | + <div class="item_container"> | |
| 14 | + <div class="title"> | |
| 15 | + <?= Html::a($product->name, | |
| 16 | + [ | |
| 17 | + 'catalog/product', | |
| 18 | + 'product' => $product->alias, | |
| 19 | + ] | |
| 20 | + ) ?> | |
| 21 | + </div> | |
| 22 | + <div class="img"> | |
| 23 | + <a href="<?=Url::to([ | |
| 24 | + 'catalog/product', | |
| 25 | + 'product' => $product->alias, | |
| 26 | + ])?>"> | |
| 27 | + <?= \common\components\artboximage\ArtboxImageHelper::getImage( | |
| 28 | + $product->imageUrl, | |
| 29 | + 'list', | |
| 30 | + [ | |
| 31 | + 'alt' => $product->name, | |
| 32 | + 'title' => $product->name, | |
| 33 | + 'class' => 'selected', | |
| 34 | + 'itemprop' => 'image', | |
| 35 | + ] | |
| 36 | + ) ?> | |
| 37 | + </a> | |
| 38 | + <div class="info_icons"> | |
| 39 | + <a href="#" class="btn btnBuy buy_button" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm" lang="5893">Купить светильник</a> | |
| 40 | + | |
| 41 | + <?php /* | |
| 42 | + <ul class="ul wishlike_block"> | |
| 43 | + <li class="compare"> | |
| 44 | + <a onclick="add2compare(); return false;" class="compare compare_text_link_5893" lang="5893" href="#">К сравнению</a> | |
| 45 | + <span class="icon"></span> | |
| 46 | + </li> | |
| 47 | + <li class="like"> | |
| 48 | + <a class="like like_text_link_5893" lang="5893" href="#">В избранное</a><span class="icon"></span> | |
| 49 | + </li> | |
| 50 | + </ul> | |
| 51 | + */ ?> | |
| 52 | + | |
| 53 | + </div> | |
| 54 | + </div> | |
| 55 | + <div class="price"> | |
| 56 | + <div class="dlexfduinxipi"> | |
| 57 | + Цена: | |
| 58 | + <span class="main"> <?php | |
| 59 | + echo \Yii::$app->formatter->asDecimal($product->variant->price); | |
| 60 | + ?> <span class="currency">грн</span> | |
| 61 | + </span> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <div class="additional_info params"> | |
| 65 | + </div> | |
| 66 | + <div class="opacity_bg"></div> | |
| 67 | + </div> | |
| 68 | + </div> | |
| 69 | +</div> | ... | ... |
common/modules/product/widgets/views/products_block.php
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - /** | |
| 4 | - * @var View $this | |
| 5 | - * @var Product[] $products | |
| 6 | - */ | |
| 7 | - | |
| 8 | - use common\modules\product\models\Product; | |
| 3 | + use yii\helpers\Html; | |
| 9 | 4 | use yii\web\View; |
| 10 | 5 | |
| 6 | + | |
| 11 | 7 | ?> |
| 12 | 8 | |
| 13 | -<?php if (!empty($products)) { ?> | |
| 14 | - | |
| 15 | - <div class="collection"> | |
| 16 | - <br/> | |
| 17 | - <h2 id="collection"> | |
| 18 | - Похожие товары | |
| 19 | - </h2> | |
| 20 | - | |
| 21 | - <div class="catalog_product_list view_table"> | |
| 22 | - <?php foreach ($products as $product) { | |
| 23 | - echo $this->render( | |
| 24 | - 'product_smart', | |
| 25 | - [ | |
| 26 | - 'product' => $product, | |
| 27 | - ] | |
| 28 | - ); | |
| 29 | - } ?> | |
| 30 | - </div> | |
| 31 | - <div class="clearfix"></div> | |
| 9 | +<?php if(!empty($products)) :?> | |
| 10 | + | |
| 11 | + | |
| 12 | + <!-- <span style="">--><?//= $title?><!--</span>--> | |
| 32 | 13 | |
| 14 | + <div id="product_main_slider" class=""> | |
| 15 | + <?php foreach($products as $product) :?> | |
| 16 | + <?= $this->render('product_smart', [ | |
| 17 | + 'product' => $product, | |
| 18 | + 'class' => $class | |
| 19 | + ]);?> | |
| 20 | + <?php endforeach?> | |
| 33 | 21 | </div> |
| 34 | 22 | |
| 35 | 23 | |
| 36 | -<?php } ?> | |
| 37 | 24 | \ No newline at end of file |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | +<?php endif?> | |
| 29 | + | ... | ... |
common/modules/product/widgets/views/products_block_similar.php
0 → 100755
| 1 | +<?php | |
| 2 | + | |
| 3 | + /** | |
| 4 | + * @var View $this | |
| 5 | + * @var Product[] $products | |
| 6 | + */ | |
| 7 | + | |
| 8 | + use common\modules\product\models\Product; | |
| 9 | + use yii\web\View; | |
| 10 | + | |
| 11 | +?> | |
| 12 | + | |
| 13 | +<?php if (!empty($products)) { ?> | |
| 14 | + | |
| 15 | + <div class="collection"> | |
| 16 | + <br/> | |
| 17 | + <h2 id="collection"> | |
| 18 | + Похожие товары | |
| 19 | + </h2> | |
| 20 | + | |
| 21 | + <div class="catalog_product_list view_table"> | |
| 22 | + <?php foreach ($products as $product) { | |
| 23 | + echo $this->render( | |
| 24 | + 'product_smart', | |
| 25 | + [ | |
| 26 | + 'product' => $product, | |
| 27 | + ] | |
| 28 | + ); | |
| 29 | + } ?> | |
| 30 | + </div> | |
| 31 | + <div class="clearfix"></div> | |
| 32 | + | |
| 33 | + </div> | |
| 34 | + | |
| 35 | + | |
| 36 | +<?php } ?> | |
| 0 | 37 | \ No newline at end of file | ... | ... |