i must have this code...
if (!empty($difference))
{
echo tep_draw_separator('pixel_trans.gif', '100%', '10');
echo '<span class="pricesavingstext">' . TEXT_PRICE_SAVINGS . '</span><span class="pricesavings">' . $difference . ' (' . $savings . '%)</span>';
}
in this Code next the Price...
<?php
//REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER
$header_star_product = array();
$header_star_product[] = array('align' => 'center', 'text' => sprintf(STAR_TITLE));
new contentBoxHeading($header_star_product);
//END OF -REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER-
function tep_star_product_with_attributes($products_id) {
$attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");
$attributes = tep_db_fetch_array($attributes_query);
if ($attributes['count'] > 0) {
return true;
}
else {
return false;
}
}
$star_products_query = tep_db_query("select substring(pd.products_description, 1, 299) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from ( " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp ) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");
$star_products = tep_db_fetch_array($star_products_query);
$star_products['products_name'] = tep_get_products_name($star_products['products_id']);
$evita_cortar_palabras = explode( ' ', $star_products["products_description"] );
array_pop( $evita_cortar_palabras );
$star_products["products_description"] = implode( ' ', $evita_cortar_palabras );
if (!tep_star_product_with_attributes($star_products['products_id'])) {
$star_products["0"] = array('align' => 'center',
'params' => '',
'text' => '
<table width="100%" border="0" cellspacing="1" cellpadding="4" bgcolor="#B2B2B2">
<tr>
<td bgcolor="#F4FAFF" height="40" width="100%" class="star-product-title"><img src="images/lk_blue.gif" width="15" height="15" align="MIDDLE" alt="'.$star_products['products_name'].'"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $star_products['products_id']) . '">' . $star_products['products_name'] . '</a></td>
</tr>
<tr><td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="CENTER" style="padding:5px;" colspan="2"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $star_products['products_id']) . '"><br>' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT) . '</a></td>
<td align="left" height="100%" width="50%" class="star-product">'. tep_draw_separator('pixel_trans.gif', '0', '25') . strip_tags($star_products["products_description"]) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a><br><br><br>
<?php class="star-product-price" style="padding:10px;"?><h2 align="center">'.
$products_price = tep_get_products_display_price($star_products['products_id']) . tep_get_products_display_price($star_products['products_id'], true) . '</h2></td>
************ in this near i must have the Code **************************
</tr>
<tr>
<td height="100%" align="right" valign="bottom" width="100%" colspan="3"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/button_details.gif') . '</a></td>
</tr></table></table>');
$star_products_output = array_slice($star_products, sizeof($star_products)-1);
new contentBox($star_products_output);
}
else {
$star_products["0"] = array('align' => 'center',
'params' => '',
'text' => '
<table width="100%" border="0" cellspacing="1" cellpadding="4" bgcolor="#B2B2B2">
<tr>
<td bgcolor="#F4FAFF" height="40" width="100%" class="star-product-title"><img src="images/lk_blue.gif" width="15" height="15" align="CENTER" alt="'.$star_products['products_name'].'"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $star_products['products_id']) . '">' . $star_products['products_name'] . '</a></td>
</tr>
<tr><td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="padding:5px;" colspan="3"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $star_products['products_id']) . '"><br>' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT) . '<br></a></td>
</tr>
<tr>
<td align="center" height="100%" width="100%" class="star-product" colspan="3">'. tep_draw_separator('pixel_trans.gif', '10', '25') . strip_tags($star_products["products_description"]) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a><br><br><hr></td>
</tr><tr>
<td height="100%" width="25%" align="left"></td>
<td height="100%" width="50%" class="star-product-price" align="center" style="padding:10px;"><h2>'.
$products_price = tep_get_products_display_price($star_products['products_id']) . tep_get_products_display_price($star_products['products_id'], true) . '</td>
</h2>
<td height="100%" align="right" valign="bottom" width="25%"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/button_details.gif') . '</a></td>
</tr></table></table>');
new contentBox($star_products);
}
?>
Please help me.
MfG
Andreas














