Actually you want to copy the files:
/includes/modules/featured_products.php
/includes/modules/new_products.php
to your templates and overrides:
/includes/modules/your_template_dir/featured_products.php
/includes/modules/your_template_dir/new_products.php
and customize the code there to add that code for the categories_name ...
Look for how the products_id is referred to in the code and you need to reference it the same way ...
For example in the featured_products.php around line 71 or so I changed the code to read:
// find categories_name
$cat_name = zen_categories_lookup(zen_products_lookup($featured_products->fields['products_id'], 'master_categories_id'), 'categories_name');
$list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' . $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' . $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '">' . $featured_products->fields['products_name'] . '</a><br />' . $cat_name . '<br />' . $products_price);
NOTE: None of this is going to work if you do not add the Known Bug Fixes for v1.3.8 at:
http://www.zen-cart.com/forum/showthread.php?p=697924#post697924
specifically post #30 ...
Linda McGrath
If you have to think ... you haven't been zenned ...
**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!