12 replies [Last post]
master_phat's picture
Offline
Joined: 08/19/2008
Juice: 103
Was this information Helpful?

I don't want the user to ever be able to go to the catalog page. Is there a way to remove it from the breadcrumb?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Remove "catalog" link from breadcrumb

It's in the catalog settings at admin/store/settings/catalog/edit.

master_phat's picture
Offline
Joined: 08/19/2008
Juice: 103
Re: Re: Remove "catalog" link from breadcrumb

awesome, thank you

benko's picture
Offline
Joined: 01/14/2009
Juice: 66
Hi There, Perhaps I am

Hi There,

Perhaps I am missing something but this doesnt seem to work for me.
In admin/store/settings/catalog/edit I uncheck 'Display the catalog breadcrumb' / This removes the breadcrumb entirely except for the 'Home' link.

On a product page where I have Home > Catalog > Category id still like it to display Home > Category

Any help would be much appreciated Smiling

humanchimp at yahoo dot com's picture
Offline
Joined: 01/18/2009
Juice: 79
ok, i found a less-than-ideal solution...

Well, I had the same problem, and this is how I solved it, which was not ideal, because it involved actually hacking ubercart core. On line 1188 of uc_catalog.module, there is some code that says:

if ($tid != 0) {
$breadcrumbs[] = l(variable_get('uc_catalog_name', t('Catalog')), 'catalog');
}

Comment those lines out, and the Catalog link will be removed from the breadcrumb.

Tell me if there is a way to do this with hooks, please, so as not to hack uc_catalog.module

Thanks.

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
Re: ok, i found a less-than-ideal solution...

The usual way would be to override theme_breadcrumb() - have you tried that?

<tr>.
humanchimp at yahoo dot com's picture
Offline
Joined: 01/18/2009
Juice: 79
I'll try that

Thanks, let me give that a try... that would be much better if it works.

humanchimp at yahoo dot com's picture
Offline
Joined: 01/18/2009
Juice: 79
Theming the breadcrumb seems to work fine

Taking TR's advice, I implemented this hook in my theme as follows:

function phptemplate_breadcrumb($breadcrumb) {
foreach( $breadcrumb as $key=>$crumb )
if( strpos( $crumb, '>Catalog<' ) )
array_splice($breadcrumb, $key, 1);
if (!empty($breadcrumb)) {
return ''. implode(' › ', $breadcrumb) .'';
}
}

Thanks, that works fine

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Re: Theming the breadcrumb seems to work fine

Actually you can control breadcrumbs by Workflow_ng, you have to check for regex once a node is viewed

design-ng's picture
Offline
Joined: 09/25/2009
Juice: 2
Great!

Thanks for this!

humanchimp at yahoo dot com's picture
Offline
Joined: 01/18/2009
Juice: 79
Oh, there's one more place

Apparently, that only solves this issue for the catalog pages. For the node pages, there is another place that needs to be hacked. On line 171 of uc_catalog.module, comment out the line that says:

$crumbs[] = l(variable_get('uc_catalog_name', t('Catalog')), variable_get('uc_catalog_url','catalog'));

That's it; thanks.

Keenp's picture
Offline
Joined: 03/01/2010
Juice: 12
maybe I am doing something wrong

Hello,

I have tried to follow the instructions to comment out the line of code above but it has no effect on my node page. Any suggestions? I created custom catalog pages with views and I do not want any links to the default catalog pages on my site.

I have attached a screen shot of the links that keep coming up on my product node pages. I have them set to not show up in my store configuration and have tried to follow suggestions in this forum:(

If you can help that would be great.

Thank you

AttachmentSize
breadcrumbs.jpg 26.49 KB
dbabbage's picture
Offline
Joined: 04/19/2008
Juice: 32
Thank you

Fabulous. That code snippet is fabulous.