Use the Catalogue view for more than one category?

4 replies [Last post]
Joined: 01/20/2008
Juice: 150

The catalogue settings page (admin/store/settings/catalog/edit) lets you choose which taxonomy vocabulary you wish to use as a catalogue.

Is it possible to select more than one vocabulary to display as a catalogue display?

The reason I ask is that I have used the taxonomy categories to organize the products on my site.
As is standard in Drupal, the vocabulary terms appear on the nodes that they are applied to and the end user can click on these terms to see all the nodes that belong to that term.

For example, T-Shirts belong to the T-Shirt vocabulary term which is part of the clothing category.
When the user views a T-Shirt product, they can click on the T-Shirt vocabulary term link and then see all the T-Shirts on the site.

At the moment, the T-Shirt page displays full node views of all the T-Shirts, which is difficult to navigate.
It would be much better if they could be displayed as a catalogue view. I cannot assign the clothing category vocabulary as a catalogue view (in admin/store/settings/catalog/edit) , as I am already using the catalogue view to display all my products by Brand.

I know I could create a custom view with the Grid Bonus module to reproduce a catalogue-like view. However, the end user wouldn't be able to access this view when they click on the T-Shirt vocabulary term link.

Joined: 08/07/2007
Juice: 15375

Hmm... actually, I just had some unexpected success yesterday overriding the normal taxonomy lists with a View... using the arguments feature of Views, you can filter products based on a term ID found in the URL. I kind of lucked out, as I wasn't exactly sure how it would work... but it ended up being exactly what I needed.

The example, though it won't make a whole lotta sense w/o admin access, is http://supportministry.com/reading-lists. I have a single argument for the term ID, and I make sure that I put that into the page URL setting for the View. It automatically takes care of the filtering, and then I sort the nodes listed based on another field I setup for that site owner on his reading list nodes.

Joined: 01/20/2008
Juice: 150

If possible, could you please post the code you used for the argument (and maybe a screenshot of the settings you have for the view).

Thanks ^_^

Joined: 08/07/2007
Juice: 15375

So, I setup a View that provides a page and set its URL to taxonomy/term/$arg. I've attached a screenshot of the arguments and filters settings. Notice that I don't have to provide any sort of filter information for the term ID, because that gets handled by the argument.

The argument stuff isn't totally clear, but I believe it uses the $arg values from the URL and hands those off to the arguments you specify in order... the %1 there just indicates to get the title from the term specified by the $arg.

AttachmentSize
views-settings-1.jpg 65.73 KB
Joined: 01/20/2008
Juice: 150

Gosh! That was really easy. I think the bit that threw me was that the URL field in views says "Do not try to use URLs such as taxonomy/term/$arg", which is ironic because that is exactly what you need to do!

This is a most excellent find.

Thank you greatly for your help.

^_^