Улучшение advanced catalog

Захотелось чтоб в Ubercart advanced catalog при выборе категории отображались товары из вложенных подкатегорий, а список категорий отображался картинками.
Результат можно посмотреть здесь: http://www.krasmebel.ru/shop/catalog/ofisnaya-mebel
Для этого
1. В представлении advanced_catalog заменил Аргумент Таксономия: ID Термина на
Таксономия: ID Термина (с глубиной)
2. Поправил
/sites/all/modules/uc_advanced_catalog/uc_advanced_catalog.module

Обновлено (исправленный вариант):

<?php
  
if ($count 0) {
/*    if (count($links)) {
      $output .= theme('links', $links, array('class' => 'links inline uc-categories')) ."<br />\n";
    }

    // creating pager
    ksort($row);
    $rows[] = $row;
    $pager = theme('table', array(), $rows, array('class' => 'pager-field'));

    // output construction
    $output .= $catalog->description;
*/
//My begin

    // creating pager
    ksort($row);
    
$rows[] = $row;
    
$pager theme('table', array(), $rows, array('class' => 'pager-field'));

    // original code
    // Display table of child categories similar to an osCommerce site's front page.
    
$columns variable_get('uc_catalog_category_columns'3);
    
$cat_rows = array();
    
$row1 = array();
    
$i 1;
    foreach (
$child_list as $cell) {
      
$row1[] = array('data' => $cell'class' => 'category');
      if (
$i $columns == 0) {
        
$cat_rows[] = $row1;
        
$row1 = array();
      }
      
$i++;
    }
    if (
count($row1) > && count($row1) < $columns) {
      if (
count($cat_rows) >= 1) {
        
$row1 array_merge($row1array_fill(count($row1), $columns count($row1), array('data' => '&nbsp;''class' => 'category')));
      }
      
$cat_rows[] = $row1;
    }
    
$output .= $catalog->description;
    
$output .= theme('table', array(), $cat_rows, array('class' => 'category'));

//My end

?>

Источник: http://www.drupal.ru/node/55950

Добавить комментарий к записи "Улучшение advanced catalog"

Чтобы комментировать, необходимо войти в систему.

© 2009 Обзор CMS