From b2871546858de08d5a57ea5ebfae25cd3ce414d2 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 22 Feb 2017 16:11:27 +0200 Subject: [PATCH] -Product card cross links (beta) --- frontend/views/catalog/product.php | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php index e82ea59..27d90c5 100755 --- a/frontend/views/catalog/product.php +++ b/frontend/views/catalog/product.php @@ -495,16 +495,15 @@ Бренд brand) ? Html::a($product->brand->name, [ -// 'catalog/category', -// 'category' => $category, -// 'filters' => [ -// 'brands' => [ -// $product->brand->alias -// ] -// ] -// ]) : ''; - echo $product->brand->name; + echo !empty($product->brand) ? Html::a($product->brand->name, [ + 'catalog/category', + 'category' => $category, + 'filters' => [ + 'brands' => [ + $product->brand->alias + ] + ] + ]) : ''; ?> getActiveProperties($category->category_id) as $group) { @@ -514,20 +513,20 @@ _options as $option) { -// if ($group->is_filter) { -// echo Html::a(' ' . $option->ValueRenderHTML, -// [ -// 'catalog/category', -// 'category' => $category, -// 'filters' => [ -// $group->alias => [ -// $option->alias -// ] -// ] -// ]); -// } else { + if ($group->is_filter) { + echo Html::a(' ' . $option->ValueRenderHTML, + [ + 'catalog/category', + 'category' => $category, + 'filters' => [ + $group->alias => [ + $option->alias + ] + ] + ]); + } else { echo ' ', $option->ValueRenderHTML; -// } + } } ?> -- libgit2 0.21.4