?> <div class="page-header"> <h1> <?php echo Yii::t('StoreModule.store', 'Products'); ?> <small><?php echo Yii::t('StoreModule.store', 'administration'); ?> </small> </h1> </div> <?php $this->widget('yupe\\widgets\\CustomGridView', ['id' => 'product-grid', 'sortableRows' => true, 'sortableAjaxSave' => true, 'sortableAttribute' => 'position', 'sortableAction' => '/store/productBackend/sortable', 'type' => 'condensed', 'dataProvider' => $model->search(), 'filter' => $model, 'actionsButtons' => ['add' => CHtml::link(Yii::t('StoreModule.store', 'Add'), ['/store/productBackend/create'], ['class' => 'btn btn-sm btn-success pull-right']), 'copy' => CHtml::link(Yii::t('StoreModule.store', 'Copy'), '#', ['id' => 'copy-products', 'class' => 'btn btn-sm btn-default pull-right', 'style' => 'margin-right: 4px;'])], 'columns' => [['type' => 'raw', 'value' => function ($data) { return CHtml::image(StoreImage::product($data, 40, 40), $data->name, ["width" => 40, "height" => 40, "class" => "img-thumbnail"]); }], ['name' => 'name', 'type' => 'raw', 'value' => function ($data) { return CHtml::link(\yupe\helpers\YText::wordLimiter($data->name, 5), ["/store/productBackend/update", "id" => $data->id]); }], ['class' => 'bootstrap.widgets.TbEditableColumn', 'name' => 'sku', 'editable' => ['emptytext' => '---', 'url' => $this->createUrl('/store/productBackend/inline'), 'mode' => 'inline', 'params' => [Yii::app()->getRequest()->csrfTokenName => Yii::app()->getRequest()->csrfToken]], 'filter' => CHtml::activeTextField($model, 'sku', ['class' => 'form-control'])], ['class' => 'yupe\\widgets\\EditableStatusColumn', 'name' => 'producer_id', 'url' => $this->createUrl('/store/productBackend/inline'), 'source' => CMap::mergeArray(['' => '---'], Producer::model()->getFormattedList()), 'editable' => ['emptytext' => '---']], ['name' => 'category_id', 'value' => function ($data) { $categoryList = '<span class="label label-primary">' . (isset($data->category) ? $data->category->name : '---') . '</span>'; foreach ($data->categories as $category) { $categoryList .= '<br>' . $category->name; } return $categoryList; }, 'type' => 'raw', 'filter' => CHtml::activeDropDownList($model, 'category_id', StoreCategoryHelper::formattedList(), ['encode' => false, 'empty' => '', 'class' => 'form-control']), 'htmlOptions' => ['width' => '220px']], ['class' => 'bootstrap.widgets.TbEditableColumn', 'name' => 'price', 'value' => function (Product $data) { return round($data->getBasePrice(), 2); }, 'editable' => ['url' => $this->createUrl('/store/productBackend/inline'), 'mode' => 'inline', 'params' => [Yii::app()->getRequest()->csrfTokenName => Yii::app()->getRequest()->csrfToken]], 'filter' => CHtml::activeTextField($model, 'price', ['class' => 'form-control'])], ['class' => 'bootstrap.widgets.TbEditableColumn', 'name' => 'discount_price', 'header' => Yii::t('StoreModule.store', 'New price'), 'value' => function (Product $data) { return round($data->getDiscountPrice(), 2); }, 'editable' => ['emptytext' => '---', 'url' => $this->createUrl('/store/productBackend/inline'), 'mode' => 'inline', 'params' => [Yii::app()->getRequest()->csrfTokenName => Yii::app()->getRequest()->csrfToken]], 'filter' => CHtml::activeTextField($model, 'discount_price', ['class' => 'form-control'])], ['class' => 'yupe\\widgets\\EditableStatusColumn', 'name' => 'in_stock', 'header' => Yii::t('StoreModule.store', 'Availability'), 'url' => $this->createUrl('/store/productBackend/inline'), 'source' => $model->getInStockList(), 'options' => [Product::STATUS_IN_STOCK => ['class' => 'label-success'], Product::STATUS_NOT_IN_STOCK => ['class' => 'label-danger']]], ['class' => 'bootstrap.widgets.TbEditableColumn', 'name' => 'quantity', 'value' => function (Product $data) { return $data->quantity; }, 'header' => Yii::t('StoreModule.store', 'Rest'), 'editable' => ['url' => $this->createUrl('/store/productBackend/inline'), 'mode' => 'inline', 'params' => [Yii::app()->getRequest()->csrfTokenName => Yii::app()->getRequest()->csrfToken]], 'filter' => CHtml::activeTextField($model, 'price', ['class' => 'form-control'])], ['class' => 'yupe\\widgets\\EditableStatusColumn', 'name' => 'status', 'url' => $this->createUrl('/store/productBackend/inline'), 'source' => $model->getStatusList(), 'options' => [Product::STATUS_ACTIVE => ['class' => 'label-success'], Product::STATUS_NOT_ACTIVE => ['class' => 'label-info'], Product::STATUS_ZERO => ['class' => 'label-default']]], ['class' => 'yupe\\widgets\\CustomButtonColumn', 'buttons' => ['front_view' => ['visible' => function ($row, $data) {
<?php $productUrl = Yii::app()->createUrl('/store/product/view', ['name' => CHtml::encode($data->slug)]); $basePrice = (double) $data->getBasePrice(); ?> <div class="catalog__item"> <article class="product-vertical"> <a href="<?php echo $productUrl; ?> "> <div class="product-vertical__thumbnail"> <img src="<?php echo StoreImage::product($data, 150, 280, false); ?> " class="product-vertical__img" /> </div> </a> <div class="product-vertical__content"><a href="<?php echo $productUrl; ?> " class="product-vertical__title"><?php echo CHtml::encode($data->getName()); ?> </a> <div class="product-vertical__price"> <div class="product-price"><?php echo $data->getResultPrice(); ?> <span class="ruble"> <?php echo Yii::t("StoreModule.store", Yii::app()->getModule('store')->currency);
</div> <?php if ($product->isSpecial()) { ?> <div class="product-gallery__label"> <div class="product-label product-label_hit"> <div class="product-label__text">Хит</div> </div> </div> <?php } ?> </div> <div class="product-gallery__nav"> <a href="<?php echo StoreImage::product($product); ?> " rel="group" data-product-thumbnail class="product-gallery__nav-item"> <img src="<?php echo $product->getImageUrl(60, 60, false); ?> " alt="" class="product-gallery__nav-img"> </a> <?php foreach ($product->getImages() as $key => $image) { ?> <a href="<?php echo $image->getImageUrl(); ?>
<div class="btn h-slider__control h-slider__prev js-slick__prev"></div> </div> <div class="h-slider__slides js-slick__container"> <?php foreach ($products as $product) { ?> <div class="h-slider__slide"> <div class="grid-module-4"> <div class="product-mini"> <div class="product-mini__thumbnail"> <a href="<?php echo ProductHelper::getUrl($product); ?> "> <img src="<?php echo StoreImage::product($product, 92, 92, false); ?> " class="product-mini__img" alt="<?php echo CHtml::encode($product->getImageAlt()); ?> " title="<?php echo CHtml::encode($product->getImageTitle()); ?> " > </a> </div> <div class="product-mini__info">
?> </price> <oldprice><?php echo $offer->getBasePrice(); ?> </oldprice> <currencyId><?php echo Yii::app()->getModule('store')->currency; ?> </currencyId> <categoryId><?php echo $offer->category_id; ?> </categoryId> <picture><?php echo StoreImage::product($offer); ?> </picture> <name><?php echo htmlspecialchars(strip_tags($offer->name)); ?> </name> <model><?php echo htmlspecialchars(strip_tags($offer->name)); ?> </model> <vendor><?php echo htmlspecialchars(strip_tags($offer->producer->name)); ?> </vendor> <description><?php
<?php /** * @var Product $product */ ?> <div class="h-slider__slide js-overlay-item"> <div class="grid-module-3"> <article class="product-vertical"> <a href="<?php echo ProductHelper::getUrl($product); ?> "> <div class="product-vertical__thumbnail"> <img src="<?php echo StoreImage::product($product, 150, 280, false); ?> " class="product-vertical__img" alt="<?php echo CHtml::encode($product->getImageAlt()); ?> " title="<?php echo CHtml::encode($product->getImageTitle()); ?> " /> </div> </a> <div class="product-vertical__content"><a href="<?php