Hello,

I don't know wether this is a feature request or a bug.

It seems to me that the catalog bloc should display product names on request (configuration in admin).
This would allow to theme a block using a menu for direct access to the whole range of products.

Do you have any idea or guidance how this can be done?

Comments

grub3’s picture

I had a first look at the code and believe that a possible solution:

Allow to display products in the catalog bloc (in admin):

    $form['block-display']['uc_catalog_display_products_in_block'] = array('#type' => 'checkbox',
    '#title' => t('Display products in the catalog block, below categories (useful for small stores). Do not enable on large stores.'),
    '#summary callback' => 'summarize_checkbox',
    '#summary arguments' => array(
      t('Display products in the catalog block, below categories.'),
      t('Do not display products in the catalog block.'),
    ),
    '#default_value' => variable_get('uc_catalog_display_products_in_block', FALSE),
  );

Then modify _uc_catalog_navigation:

      if ($child_in_path) {
        $inpath = $child_in_path;
        }
        else {
           // fetch products
        }

If a taxonomy term has no child, it means that products are attached.

Do you think this is a reasonable approach?
Can you provide some guidance?

joachim’s picture

I'd say any improvements to blocks and lists of things in general should be done as part of a move over to depend on Views module.

grub3’s picture

I am trying Catalog menu module and custom hooks.
I don't know wether it will work, but in the meanwhile I close this issue.

Thanks!

grub3’s picture

Status: Active » Closed (fixed)