Catalog description

Contrib type: 
Code/CSS Snippet
Status: 
Complete and working
Compatibility: 
Ubercart Alpha 7b

I searched the site and did not see this anywhere else, so I am posting here in the event it might help someone.

Essentially, by adding some text in the UC catalog.module, you can provide to customers a description of your /store/catalog page above the Catalog display itself.

1. Open uc_catalog.module in a text editor.

2. Find line 501 or thereabouts (turn off line wrapping).

3. Look for the following bit of code:

<?php
 
else {
   
$tid = 0;
   
$name = variable_get('uc_catalog_name', t('Catalog'));
   
$description = '';
  }
?>

4. In between the two little quotation marks after the <$description => you can insert some text the describes what the customer sees and how to navigate the catalog to go to the desired product page. You can use basic html tags (table, strong, etc.) to format the text. Don't get too fancy, because only filtered html will show up, as far as I know.

5. This is a nice addition, in my opinion; otherwise the customer sees a page which says Catalog and a display of product categories without any introduction whatsoever. Enjoy!

Re: Catalog description

It strikes me that this could be accomplished without hacking a core module (even if it's just a minor hack) by using a module to add help text to those pages. I made a custom one for a site a while back, but you may be able to use this module:

http://drupal.org/project/helptip

Then again... maybe not. Sticking out tongue

Re: Re: Catalog description

Because of this contribution, I've already gone and hacked core myself. In addition to changing the name of the Catalog, there is now a setting to change it's description. Thanks, bwv.

Re: Re: Re: Catalog description

Where do I need to go in Alpha 8 to change the catalog description?

Re: Re: Re: Re: Catalog description

Edit the Catalog vocabulary under Content management. It's the same place where you set the vocabulary's name and allowed node types.

thank you very much...

for including:

1. Open uc_catalog.module in a text editor.

2. Find line 501 or thereabouts (turn off line wrapping).

3. Look for the following bit of code:

why? becuase all over drupal and ubercart it doesnt explain how to do such functions.

i think this is what ive been trying to figure out: re: how to edit the script/php code ect..

however...

when saving the settings, after editing...what are the donts?
do i just hit save? or do i have to use a particular editor with certain file name extentions? ie:

".module"

obviously its not ".txt", sorry if this is small compaired to other questions, but im off on the right foot i think.

thanks,

Re: thank you very much...

If I understand you right, the main reason Drupal/Ubercart don't tell people where to find and modify pieces of code is because we don't want it to happen. Smiling When code is modified, that instantly breaks any sort of update process... at the very best requiring you to remember any custom changes you've made and duplicate them with each update. With Ubercart as young as it is, that's going to get old fast.

It's best to come up with a solution that either involves using a settings form or making a custom module that hooks into the code at appropriate places to change things.

The short answer to your question is just save it as a text file and keep the extension intact and you'll be alright. Eye-wink

note pad?

so...note pad is ok? nvu? editplus? are these ok to edit in?
save via? .txt

is this something to point to a skilled individual to troble shoot?
ive been saving a hook log. but thats for what? when i upgrade?

ok so....if its not best to take this sort of action, then what?
dont save a hook log....just, what? take another form of action to insure that upgrades/updates are performed in a more efficient action?

got a doc for me to read on this?

kasperjames

THANK VERY MUCH! I APPRECIATE IT!