Catalog-like block when using views

Posts: 13
Joined: 02/24/2008

Hello, I am using views to provide a custom catalogue page, but I can't figure out how to make a catalogue block like the one that comes with the default catalog (taking top level taxonomy terms and linking them to the catalog view). I've tried taxonomy menu, and I tried doing it manually but neither seems to do the right thing. Am I on the right track? Any clues?

Thanks
Matt

Posts: 13
Joined: 02/24/2008

After much much searching I've managed to cobble something together. A brief tutorial is given below. This will give you a table view (like the catalog default) that you can add custom fields to.

-Add any custom fields you want to the product content type. I did this using CCK but I'm sure there are other ways
-Add a new view, give it a name
-Select page view and make sure "Provide a page view" is checked
-Add in a URL for whereever you would like it to appear (eg. shop/catalogue)
-Select Table as "view type"
-Give it a good user friendly title (eg. Catalogue). This will appear at the top of the page
-Select any further options you would like (eg. pager)
-In the "Fields" section select the fields you want, such as "Node: Title", "Image: Image (field_image_cache", "Product: Sell price", "Product: Add to cart link" and any other custom fields you defined (These will be defined as "widget: title", eg "Text: Miscellaneous")
-In the "Arguments" section select "Taxonomy: Term ID" for the argument, set the default as "Display all values" and the title as %1. The %1 uses the term name as the views title.
-In the "Filters" section add "Product: Is a product" equals yes
-Set any other options you want

To provide the menu follow the instructions below. Make sure you replace the two "taxonomy/term/" urls with the url you defined for the view (shop/catalogue/) in this example. You can find out the vocab ID by going to your categories page and clicking on the relevant "edit vocabularies" link. The vocab ID is the last number in the url:

http://tela-web.com/drupal/taxonomy-term-list-with-subterms-for-drupal/

Hopefully this will save you some time!