Solved

Drupal 7 ubercart. Displaying selected products

Posted on 2013-01-10
4
335 Views
Last Modified: 2013-01-12
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
Comment
Question by:bogorman
  • 3
4 Comments
 
LVL 13

Accepted Solution

by:
Arrow_1 earned 500 total points
ID: 38765090
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
 

Author Comment

by:bogorman
ID: 38766689
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
 

Author Comment

by:bogorman
ID: 38769934
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
 

Author Comment

by:bogorman
ID: 38770242
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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Every business owner understands the significance of online customer reviews and the impact it can have on sales and revenues. With technology advancing at such a rapid pace, getting online reviews has never been easier, especially when many regions…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now