Commit b2871546858de08d5a57ea5ebfae25cd3ce414d2

Authored by Alexey Boroda
1 parent 9d0ce9e2

-Product card cross links (beta)

Showing 1 changed file with 22 additions and 23 deletions   Show diff stats
frontend/views/catalog/product.php
@@ -495,16 +495,15 @@ @@ -495,16 +495,15 @@
495 <tr class="full short"> 495 <tr class="full short">
496 <td class="name">Бренд</td> 496 <td class="name">Бренд</td>
497 <td class="value"><?php 497 <td class="value"><?php
498 -// echo !empty($product->brand) ? Html::a($product->brand->name, [  
499 -// 'catalog/category',  
500 -// 'category' => $category,  
501 -// 'filters' => [  
502 -// 'brands' => [  
503 -// $product->brand->alias  
504 -// ]  
505 -// ]  
506 -// ]) : '';  
507 - echo $product->brand->name; 498 + echo !empty($product->brand) ? Html::a($product->brand->name, [
  499 + 'catalog/category',
  500 + 'category' => $category,
  501 + 'filters' => [
  502 + 'brands' => [
  503 + $product->brand->alias
  504 + ]
  505 + ]
  506 + ]) : '';
508 ?></td> 507 ?></td>
509 </tr> 508 </tr>
510 <?php foreach($product->getActiveProperties($category->category_id) as $group) { 509 <?php foreach($product->getActiveProperties($category->category_id) as $group) {
@@ -514,20 +513,20 @@ @@ -514,20 +513,20 @@
514 <td class="value"> 513 <td class="value">
515 <?php 514 <?php
516 foreach($group->_options as $option) { 515 foreach($group->_options as $option) {
517 -// if ($group->is_filter) {  
518 -// echo Html::a('&nbsp;' . $option->ValueRenderHTML,  
519 -// [  
520 -// 'catalog/category',  
521 -// 'category' => $category,  
522 -// 'filters' => [  
523 -// $group->alias => [  
524 -// $option->alias  
525 -// ]  
526 -// ]  
527 -// ]);  
528 -// } else { 516 + if ($group->is_filter) {
  517 + echo Html::a('&nbsp;' . $option->ValueRenderHTML,
  518 + [
  519 + 'catalog/category',
  520 + 'category' => $category,
  521 + 'filters' => [
  522 + $group->alias => [
  523 + $option->alias
  524 + ]
  525 + ]
  526 + ]);
  527 + } else {
529 echo '&nbsp;', $option->ValueRenderHTML; 528 echo '&nbsp;', $option->ValueRenderHTML;
530 -// } 529 + }
531 } 530 }
532 ?> 531 ?>
533 </td> 532 </td>