HerrJones Posted September 26, 2005 Posted September 26, 2005 Hi, The template I'm using came with its own version of the New Products mainpage module which it shows at the first screen of the shop. The module only shows the list prices in grey and doesn't show special prices (which do exist for the listed products). In the code below it looks like it does do a check for any special pricing. I don't know enough about php to figure out why they don't show. Main priority is to have it show special prices at all (instead of normal pricing). Even better would be both prices with using the cross-out method. Can anyone see what's wrong? Thanks, HJ $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { $special_price = tep_get_products_special_price($new_products['products_id']); if ($special_price) { $products_price = '<s>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</s>??<span class="productSpecialPrice">' . $currencies->display_price($special_price, tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); } $product_query = tep_db_query("select products_name, products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $new_products['products_id'] . "' and language_id = '" . $languages_id . "'"); $product_details = tep_db_fetch_array($product_query); $new_products['products_name'] = tep_get_products_name($new_products['products_id']); $new_products['products_description'] = substr ($product_details['products_description'],0,90); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => '', 'text' => '<table width="218" height="170" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50%" align="center" valign="middle"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td> <td width="50%" valign="top"><font class="p_title2">Price:</font><br><font class="p_title">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</font> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td>'.tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')).''.tep_draw_hidden_field('products_id', $new_products['products_id']) . tep_template_image_submit('add.jpg', IMAGE_BUTTON_IN_CART).'</form></td> </tr> <tr> <td><a href="product_info.php?action=buy_now&products_id='.$new_products['products_id'].'"><img src="templates/8913/images/buy.jpg" width="64" height="20" border="0"></a></td> </tr> </table> </td> </tr> <tr> <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="9"> <tr> <td>'.$new_products['products_description'].'...</td> </tr> </table></td> </tr> </table></td> </tr> </table>');
Recommended Posts
Archived
This topic is now archived and is closed to further replies.