Hi all,

I'm using Taxonomy Menu. I found it doesn't work with Ubercart default taxonomy "Catalog". As I can see from the Ubercart Catalog Block, the path for "Bedroom's" is "http://www.victoria.my/catalog/bedrooms" and the path for "bed" is http://www.victoria.my/catalog/bed. But for under Taxonomy Bedroom's become "http://www.victoria.my/catalog/bedrooms-0" and Bed become "http://www.victoria.my/catalog/bed-0". So when menu generate from Taxonomy will not work.

Any idea why is this happening??

Thanks.

Comments

longwave’s picture

Status: Active » Postponed (maintainer needs more info)

Looks like you perhaps have duplicate paths for taxonomy items somehow (the -0 versions are created because the original path already exists), and not sure what Ubercart can do about this - shouldn't it be a Taxonomy Menu support request?

maxchock’s picture

somehow i believe is the way Ubercart default taxonomy goes wrong because others taxonomy has no problem getting the menu working correctly..

longwave’s picture

Are you sure this isn't because you have two different pathauto settings using the same path somehow? Can you see all those example URLs in your URL alias listing, and what system URLs do they point to?

maxchock’s picture

catalog/bed catalog/17
catalog/bed-0 taxonomy/term/17
catalog/bedrooms catalog/21
catalog/bedrooms-0 taxonomy/term/21

this is what I copied from "URL aliases".

BUT i just discover under Pathauto there is 2 "Catalog" path setting, one is "CATALOG PATHS=>Pattern for catalog pages" another one is "TAXONOMY TERM PATHS=>Pattern for all Catalog paths".

I wonder why this is happening..

longwave’s picture

"Catalog paths" is for linking to the Ubercart catalog view. "Taxonomy term paths" is for linking to the standard Drupal taxonomy listing.

longwave’s picture

maxchock’s picture

I understand that. But why under TAXONOMY TERM PATHS has a "Pattern for all Catalog paths"?? this cause pathauto to create 2 alias for 1 term right?

longwave’s picture

Those taxonomy term paths are provided by Drupal core (and aliased by pathauto) for all vocabularies.

maxchock’s picture

sorry, are you trying to tell me this is normal?

longwave’s picture

Yes. The two paths are for linking to two different things (the standard Drupal taxonomy listing, and the Ubercart catalog view). You cannot configure them both to be the same path. If you aren't using the standard Drupal taxonomy listing for the catalog vocabulary, either don't configure it or set it to something else to avoid conflicts.

maxchock’s picture

If that is the case, how Taxonomy menu are going to work? or should I said it is not compatible with Ubercart?

RKS’s picture

I haven't had any issues using Taxonomy Menu and UC. However, after reading through this issue and then checking my own site I actually have no idea what I did. I did notice that my site has duplicate content, which I suppose is good that I read this.

I have a CATALOG PATH which is what I think UC provides. The pattern for that is catalog/[term:name]
I also have a taxonomy which is provided to UC product as a term reference field. The default path pattern for tax terms is [taxonomy:vocabulary]/[taxonomy:term]

My menu points to catalog/[term:name] so the vocab/term is not linked from anywhere on the site and contains the same page and title as catalog/term.

Actual products are catalog/[node:name].

What I would do and what I'm going to do, is set vocab/term to redirect to catalog/term. If this fixes your problem, I think it will take care of duplicate content. That is, if my thinking is correct on this.

longwave’s picture

Status: Postponed (maintainer needs more info) » Fixed

@RKS: thanks for your comments.

Marking fixed, as according to the above Taxonomy Menu works fine with UC, you just have to configure it correctly.

amjad1233’s picture

G'day Mate,

I have one solution for your problem I am not sure if it will help you.

The following code will give you the list of menu items.

The following code will give you the list of menu items. You can use it by adding new block and Set filter as PHP

$url=explode("/",$_SERVER['REQUEST_URI']);
				//While in catalog it will find out whats the url which could be "catalog/23" etc...

				$term = taxonomy_get_term($url[2]);
				//From exploded array getting the taxonomy term id 

				$children = taxonomy_get_children($term->tid);
				//Gettin all children to creat list

				if(!empty($children))
				{
					//I am creating here a list for menu 
					$list = "<ul>";
					foreach($children as $child)
					{

						//Optionaly you can use $base or $path = "catalog/".$child->tid;
						$list.='<li class="child-catalog"><a href="'.$child->tid.'">'.$child->name."</li>";
						
					}
					$list.="</ul>";
					echo $list;
				}

PS : You can modify code as needed, I am also using a module call "Global Taxonomy Redirect" to resolve the issue

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

1800collect’s picture

What I would do and what I'm going to do, is set vocab/term to redirect to catalog/term. If this fixes your problem, I think it will take care of duplicate content. That is, if my thinking is correct on this.

Do you have any tips on how to do this?

This is also a problem if you decide to put the Taxonomy term on the product page as it will incorrectly (well technically correctly) link to the taxonomy term page which ends in -0 instead of the catalog page.

Naturalist’s picture

Do it in the reverse manner. Have system terms redirect to uc terms.

ilyasmdgh’s picture

@RKS

"My menu points to catalog/[term:name] so the vocab/term is not linked from anywhere on the site and contains the same page and title as catalog/term."

Menu points to the default path right? Default path is vocab/[term:name].

"What I would do and what I'm going to do, is set vocab/term to redirect to catalog/term"
makes perfect sense for me. Could you please tell me how do i make this types of redirect. Thanks