1 reply [Last post]
incaic's picture
Offline
Joined: 10/13/2007
Juice: 115
Was this information Helpful?

Sorry if you read this under the Bug Reports forum.
I replied to a discussion on breadcrumbs, but I think
my problem is setup. Best explained with an example.

Jewelry (parent)
- Bracelets
- Earrings

I put every earring into 2 categories, "Earrings" & "Jewelry".
This is so that when viewing Jewelry page, all subcategory
items are shown.

Unfortunately, when I set the option to show node count on
the breadcrumbs the "Jewelry" count is double. This happens
when you are viewing "Earrings" for example because
taxonomy_term_count_nodes() is called by uc_catalog_set_breadcrumb()
with the parent of the subcategory.

Am I setting the categories wrong?
Is this really a setup problem?

I appreciate any help.

Thanks.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: breadcrumb double counting

I wouldn't say it's wrong, just different ways of thinking about things. It was easiest for me to call taxonomy_term_count_nodes() on all of the catalog terms, and I liked the fact that it gave me all of the subcategories' products as well as that term's. Personally, I wouldn't put the same products in both Jewelry and Earrings because of the hierarchical relationship between them. Customers coming to the site would drill down through the catalog and expect to find jewelry in the Earrings section.

If you really want to list all of the jewelry together, I think you can make a View that includes all of the products in the subcategories, and set up a filter that chooses either or both of them.