• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

Drupal 7 ubercart. Displaying selected products

I have defined taxonomy terms to classify products:

Pamphlets
--The Sacraments
--Doctrine
--Catechetics-Reasons for Believing Pamphlets
--Catechetics
--Moral and Social
--Science

I can display any of these sets of products by going to (for example):

/catalog/catechetics

How can I display more than one category on the same page?   Is it better to use views? If so, how can I filter by one term OR another? Can I group them with a heading above each group showing the term and, if I do it this way how do I filter with an argument in the URL?
0
bogorman
Asked:
bogorman
  • 3
1 Solution
 
Aaron FeledyDrupal Developer and ConsultantCommented:
Definitely use views.

You can display more than one category on each page. You'll want to create a view to display your products, then add a filter for your vocabulary and select which terms you'd like displayed. Add whatever fields you want displayed, including the field that defines your category. Then, under the format settings for your view, you'll want choose your category field as the grouping field. This will list products from both categories on the same page, grouped by category.

In the advanced settings of your view, you can create a contextual filter. There you can set up your view to filter based on a value in the url.
0
 
bogormanAuthor Commented:
Thanks for your help. Have managed to get everything working except the contextual filter.  Have defined Content:Catalog as the filter but it displays nothing if I enter the name of the catalog term (e.g. Doctrine). It seems to require an integer argument. Is this the taxonomy id? If so how can I find the IDs for all the terms?
0
 
bogormanAuthor Commented:
Have got a bit further with this.
I have made Reasons for Believing Pamphlets a "sub term" of Catechetics.
I have de-selected "generate automatic URL alias" in the forms for the catechetics term and its sub-term.
I can display catalog/catechetics/reasons-believing-pamphlets (without the product in the root term (catechetics)
I can display the product in the root term with catalog/catechetics.
However, I cannot display all the pamphlets (those categorised by the root term and the sub-term).
The only slightly puzzling thing is that, although I have deselected "generate automatic URL alias" (see above), when I return to this form it is selected again. Perhaps this is because the automatic alias is the same as the one I have specified?
Would very much appreciate your further help on this as it will solve the problem I am sure.
0
 
bogormanAuthor Commented:
Have solved it without using URL/arguments.
You suggested views and have followed this.

Created different views for each selection, selecting by Content:Catalog = term

Where I want to display the contents of two terms, I just add another Content:Catalog.

Thanks for putting me on the right track.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now