diff --git a/frontend/controllers/CatalogController.php b/frontend/controllers/CatalogController.php
index 5a115a5..e096366 100755
--- a/frontend/controllers/CatalogController.php
+++ b/frontend/controllers/CatalogController.php
@@ -24,8 +24,8 @@ class CatalogController extends \yii\web\Controller
public function actionCategory()
{
-
-
+
+
/** @var Category $category */
$category = Yii::$app->request->get('category');
$filter = Yii::$app->request->get('filters', [ ]);
@@ -151,7 +151,7 @@ class CatalogController extends \yii\web\Controller
$priceLimits = $productModel->priceLimits($category, $params);
-
+
return $this->render('products', [
'category' => $category,
diff --git a/frontend/views/catalog/_product_item.php b/frontend/views/catalog/_product_item.php
index 30cf319..46105cf 100755
--- a/frontend/views/catalog/_product_item.php
+++ b/frontend/views/catalog/_product_item.php
@@ -38,12 +38,23 @@ use yii\helpers\Url;
?>
- = \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'list', [
- 'alt' => $model->getFullName(),
- 'title' => $model->getFullName(),
- 'class' => 'selected',
- 'itemprop' => 'image'
- ]) ?>
+ imageUrl, 'list', [
+ 'alt' => $model->getFullName(),
+ 'title' => $model->getFullName(),
+ 'class' => 'selected',
+ 'itemprop' => 'image'
+ ]);
+ } catch(Exception $exception) {
+ echo \common\components\artboximage\ArtboxImageHelper::getImage('/storage/no_photo.png', 'list', [
+ 'alt' => $model->getFullName(),
+ 'title' => $model->getFullName(),
+ 'class' => 'selected',
+ 'itemprop' => 'image'
+ ]);
+ }
+ ?>
variant->status != 1){?>
diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php
index 48747fe..a5510b5 100755
--- a/frontend/views/catalog/product.php
+++ b/frontend/views/catalog/product.php
@@ -44,8 +44,8 @@
$this->params['remarketing']['type'] = 'offerdetail';
$this->params['remarketing']['id'] = $product->variant->product_variant_id;
$this->params['remarketing']['price'] = $product->getPrice();
+
?>
-
@@ -60,7 +60,6 @@
Код:= $product->variant->sku ?>
-
@@ -69,7 +68,6 @@
- = ArtboxImageHelper::getImage($product->imageUrl, 'product_show',[
- 'alt'=>$product->fullname,
- 'title' => $product->fullname,
- 'itemprop' => 'image'
- ]) ?>
+ imageUrl, 'product_show',[
+ 'alt'=>$product->fullname,
+ 'title' => $product->fullname,
+ 'itemprop' => 'image'
+ ]);
+ } catch(Exception $exception) {
+ echo ArtboxImageHelper::getImage('/storage/no_photo.png', 'product_show',[
+ 'alt'=>$product->fullname,
+ 'title' => $product->fullname,
+ 'itemprop' => 'image'
+ ]);
+ }
+ ?>
diff --git a/frontend/views/catalog/products.php b/frontend/views/catalog/products.php
index 25ca45b..1da8cde 100755
--- a/frontend/views/catalog/products.php
+++ b/frontend/views/catalog/products.php
@@ -60,7 +60,6 @@
'priceLimits' => $priceLimits,
//'filterBrands' => $filterBrands
])?>
-
@@ -102,6 +101,7 @@
]);
?>
+
@@ -117,14 +117,12 @@
-
-
= ListView::widget([
'dataProvider' => $productProvider,
'itemView' => function ($model, $key, $index, $widget) use($category) {
return $this->render('_product_item',[
'model' => $model,
- 'category' => $category
+ 'category' => $category,
]);
},
'layout' => "{items}
{pager}",
@@ -132,9 +130,6 @@
?>
-
-
-
@@ -142,4 +137,3 @@
-
--
libgit2 0.21.4