Fixing broken code strings from etrader's post #8:
This is how to add the product description to the featured products box on the home page:
-
Copy the file: includes/modules/featured_products.php
-
Place it in an overrides folder like this:
includes/modules/your_template/featured_products.php
- Add the code for the 'product description' and 'more info link' variables:
$products_description = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);
$info_link = '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '"> more info...</a>';
- Replace the $list_box_contents variable with this code:
$list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => '<a href="' . zen_href_link(zen_get_info_page($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']), 'products_id=' . $featured_products->fields['products_id']) . '">' . $featured_products->fields['products_name'] . '</a><br />' . $products_price . '<br />' . $products_description . $info_link);
- Upload the file to your overrides folder.
Note: You can add the product description to the specials box by editing the specials_index.php file. Just replace all instances of $featured_products with $specials_index