Hello, I have managed to get this working on a very heavily moded site. Probably 55 - 60 mods. Took me an hour to integrate all the changes.
Anyways I have come to a roadblock and my newbie programming skills are not to the task of winning this battle.
I have featured products on the front page and the prices are at zero because the file hasn't been moded in the release. I've tried using code from other files but it's just not working. catalog/includes/featured_products.php
If someone could make the prices show you would rule the world for one day. Also the prices work when you aren't logged in by saying "You must be logged in"
Fixing this would be good for the community because many people have featured products on their site.
BEGIN CODE:
---------------------
<?php
/*
$Id: featured_products.php,v 2.5 2003/10/28 21:00:00 cieto Exp $
cieto Featured Products 2.5 MS2 listing module
cieto@msn.com
Made for:
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright © 2002 osCommerce
Released under the GNU General Public License
*/
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<?php
if (sizeof($featured_products_array) <> '0') {
$col = 0;
for($i=0; $i<sizeof($featured_products_array); $i++) {
if ($featured_products_array[$i]['specials_price']) {
$products_price = '<s>' . $currencies->display_price($featured_products_array[$i]['price'], tep_get_tax_rate($featured_products_array[$i]['tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($featured_products_array[$i]['specials_price'], tep_get_tax_rate($featured_products_array[$i]['tax_class_id'])) . '</span>';
} else {
$products_price = $currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}
$col++;
?>
<td width="50%" valign="top" align="center">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" rowspan="4" align="right" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $featured_products_array[$i]['image'], $featured_products_array[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td>
<td width="80%" valign="top" class="main"><div align="left"><?php echo '<b><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '"><u>' . $featured_products_array[$i]['name'] . '</u></a></b>'; ?>
</div></td>
</tr>
<tr>
<td valign="top" class="main">
<?php
if ($featured_products_array[$i]['shortdescription'] != '') {
echo $featured_products_array[$i]['shortdescription'];
} else {
$bah = explode(" ", $featured_products_array[$i]['description']);
for($desc=0 ; $desc<MAX_FEATURED_WORD_DESCRIPTION ; $desc++)
{
echo "$bah[$desc] ";
}
echo '...';
}
?>
</td>
</tr>
<tr>
<td valign="top" class="main"></td>
</tr>
<tr>
<td align="left" valign="top" class="main"><?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5') . '<br>' . TABLE_HEADING_PRICE . ': ' . $products_price; ?><br><?php echo '<form method="post" action="/dealers/product_info.php/products_id/' . $featured_products_array[$i]['id'] . '/action/add_product"><input type="hidden" name="products_id" value="' . $featured_products_array[$i]['id'] . '"><input type="submit" value="Buy Now"></form>'; ?>
<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">'; ?><?php echo TEXT_MORE_INFO;?></a> </td>
</tr>
</table>
</td>
<?php
if ((($col / FEATURED_PRODUCTS_COLUMNS) == floor($col / FEATURED_PRODUCTS_COLUMNS))) {
?>
</tr>
<tr>
<td colspan="<?php echo FEATURED_PRODUCTS_COLUMNS; ?>" align="right" valign="top" class="main"><hr width="100%" size="1" noshade></td>
</tr>
<tr>
<?php
}
if (($i+1) != sizeof($featured_products_array)) {
?>
<?php
}
}
}
?>
</table>