diff --git a/common/components/artboxtree/ArtboxTreeBehavior.php b/common/components/artboxtree/ArtboxTreeBehavior.php index 3542deb..b20657f 100755 --- a/common/components/artboxtree/ArtboxTreeBehavior.php +++ b/common/components/artboxtree/ArtboxTreeBehavior.php @@ -73,7 +73,7 @@ class ArtboxTreeBehavior extends Behavior { * get all parents * use MP-method */ - public function getParents() { + public function getParents() { return $this->getParentsMP(); } diff --git a/common/modules/product/helpers/ProductHelper.php b/common/modules/product/helpers/ProductHelper.php index 8c019a3..221dc68 100755 --- a/common/modules/product/helpers/ProductHelper.php +++ b/common/modules/product/helpers/ProductHelper.php @@ -78,7 +78,7 @@ class ProductHelper extends Object { public static function getSpecialProducts($type, $count, $sort = null) { $data = [$type => true]; return Product::find() -// ->joinWith('variants') + ->innerJoinWith('variants') ->where($data) // ->andWhere(['!=', ProductVariant::tableName() .'.stock', 0]) ->limit($count) diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php index 2f5bca7..5486bbf 100755 --- a/frontend/views/catalog/product.php +++ b/frontend/views/catalog/product.php @@ -14,11 +14,11 @@ foreach($product->category->getParents()->all() as $parent) { $this->params['breadcrumbs'][] = ['label' => $parent->categoryName->value, 'url' => ['catalog/category', 'category' => $parent]]; } $this->params['breadcrumbs'][] = ['label' => $product->category->categoryName->value, 'url' => ['catalog/category', 'category' => $product->category]]; -$this->params['breadcrumbs'][] = $product->name .' #'. $product->variant->sku; +$this->params['breadcrumbs'][] = $product->name .' #'. @$product->variant->sku; ?> -

name .' '. $product->variant->name?>

+

name .' '. @$product->variant->name?>

-
+
images)) :?> @@ -47,15 +47,16 @@ $this->params['breadcrumbs'][] = $product->name .' #'. $product->variant->sku;
- Код: variant->sku?> - stock !== 0 && $product->variant->price > 0 ? ' есть в наличии' : ' нет в наличии'?> + variant)) :?>Код: variant->sku?> + stock !== 0 && @$product->variant->price > 0 ? ' есть в наличии' : ' нет в наличии'?>
+ variant)) :?>
- variant->price > 0) :?> + variant->price > 0) :?>
- variant->price?> + variant->price?>
грн.
@@ -73,7 +74,7 @@ $this->params['breadcrumbs'][] = $product->name .' #'. $product->variant->sku; @@ -89,6 +90,7 @@ $this->params['breadcrumbs'][] = $product->name .' #'. $product->variant->sku;
+

diff --git a/frontend/views/orders/basket-step-02.php b/frontend/views/orders/basket-step-02.php index c9f17ae..d5106db 100755 --- a/frontend/views/orders/basket-step-02.php +++ b/frontend/views/orders/basket-step-02.php @@ -27,7 +27,7 @@ $this->params['breadcrumbs'][] = $this->title; product->image)) :?> - <?= $item['item']->product->image->alt ? $item['item']->product->image->alt : $item['item']->product->name?> + <?= $item['item']->product->image->alt ? $item['item']->product->image->alt : $item['item']->product->name?>

-- libgit2 0.21.4