Downloads
Hello,
I've seen a few posts in which people have requested that a teaser be made viewable in the catalog. While I'm pretty new to the Drupal/Ubercart community, AFAIK there's no way to do this with any version of Ubercart and I haven't seen anybody post any code, so I thought I post what I worked out to make teasers viewable in grid mode. It was amazingly simple! When using this code I put in tags in product descriptions to make it look how I wanted. You could likely make some similar easy changes to the code if you want the whole description to be visible.
To make teasers visible:
Around line 630 of uc_catalog/uc_catalog.module add:
variable_get('uc_catalog_grid_display_teaser', true) ?
t('Every cell on the grid will display Teasers.') :
t('Cells on the grid will not display Teasers.'),
~line 1149:
if (variable_get('uc_catalog_grid_display_teaser', TRUE)) {
$product_table .= ''. node_teaser($product->body) .'';
}
~line 1321:
$form['catalog-grid']['uc_catalog_grid_display_teaser'] = array(
'#type' => 'checkbox',
'#title' => t('Display product teaser'),
'#default_value' => variable_get('uc_catalog_grid_display_teaser', true),
);
Now you'll have to go into the grid view configuration menu and enable it.
Any reason why this feature isn't available?
