3 replies [Last post]
dontpanic's picture
Offline
Joined: 04/05/2009
Juice: 40
Was this information Helpful?

Is it possible to create a Page(node type) and have it listed as a link in the catalog block?

We have one product that instead of being able to add to cart, we want a page that describes it with some photos, and some text telling customers to contact us to purchase this product. but i want it to show up in the catalog block with all the other products.

I looked in the menu settings where you can add menu items, but catalog menu isn't in there...

Duex's picture
Offline
Joined: 05/10/2009
Juice: 52
catalog page

I'm also very interested in doing the same exact thing! Been trying to figure it out for a few weeks now

shawngo's picture
Offline
Joined: 09/13/2008
Juice: 59
URL aliases || template.php

Here are a couple quick ways to accomplish what you're after. Hope they help (and someone suggests further enhancements).

// URL aliases example

You can use URL aliases - Administer » Site building » URL aliases to map a node (the product page) to the catalog system URL.

If you know the taxonomy id (which can be found in the edit url of the taxonomy page) you can map that to System URL 'catalog/termid'.

If your term id is 1 and your intended path is catalog/some/product/path the URL alias edit page would be changed to:

Existing system path: *
http://www.example.com/catalog/1

Path alias: *
http://www.example.com/catalog/some/product/path

This is more of a 'quick fix' type example.

// template.php example:

To do this within the template.php I added the following theme override function after adding a menu called 'services'. This allowed me to add menu items to the standard catalog block menu.

/**
 * Override the default catalog menu 
 */
function YOURTHEMENAME_uc_catalog_block($menu_tree) {
  $output = '<ul class="catalog menu">';

  foreach ($menu_tree->children as $branch) {
    list($inpath, $html) = _uc_catalog_navigation($branch);
    $output .= $html;
  }
  $services = menu_tree_all_data('menu-services');
  
  foreach($services as $item => $data) {
    $path_ = arg(0) . '/' . arg(1);
    $options = $path_ == $data['link']['link_path'] ? array('attributes' => array('class' => 'trail')) : array();
    $output .= '<li class="leaf">' . l($data['link']['title'], $data['link']['link_path'], $options) . '</li>';
  }
	
  $output .= '</ul>';
  return $output;
}
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Add a page node to the catalog menu?

The catalog module that ships with Ubercart doesn't operate through the menu system. However, if you want to check it out, the Taxonomy Menu module can duplicate the functionality of the catalog block. Since it works through the menu system, you can then insert whatever static menu items you want and rearrange them as necessary.