For the sake of theming, it would be much better if the block subject used the standard block->subject location instead of making it part of the content of the block. I just spent a couple hours trying to figure out why the titles for the Best Seller and special Offers blocks weren't responding to my block.tpl.php or overrides of the theme functions for the two blocks, and finally figured out it's because the title is returned as part of the content instead of separately as the subject.
To make the change, all I had to do was modify the uc_marketing_block function by adding the $block['subject'] lines like so:
if (user_access('view catalog')) {
switch ($delta) {
case 1:
$block['subject'] = variable_get('uc_catalog_name', t('Catalog'));
$block['content'] = theme('uc_catalog_browse');
break;
case 2:
// no title, it takes it from the theme function
$block['subject'] = variable_get('uc_marketing_special_block_title', t('Special Offers'));
$block['content'] = theme('uc_marketing_special_products');
break;
case 3:
// no title, it takes it from the theme function
$block['subject'] = variable_get('uc_marketing_bestsellers_block_title', t('Best sellers'));
$block['content'] = theme('uc_marketing_bestsellers_products');
break;
case 4:
// no title, we just don't want one
$block['content'] = theme('uc_marketing_contact_link');
break;
}
}and then remove the following lines from the theme functions:
$output .= '<h2 class="title special">' . variable_get('uc_marketing_special_block_title', t('Special Offers')) . '</h2>';
$output .= '<h2 class="title best-sellers">' . variable_get('uc_marketing_bestsellers_block_title', t('Best Sellers')) . '</h2>';Also, if you look at the two theme functions, they are fairly identical, except for a couple variations. It seems that you should be able to combine them into one function and use a loop or some if..then statements to get the appropriate data for the block.


