Hola a todos que tal mi pregunta es la siguiente estoy desarrollando un carrito de compra pero me han surgido un par de dudas,resulta que e creado el modulo de proximos lanzamientos y no se como hacer para que segun en que seccion por ejemplo seccion de libros solo me muestre los lanzamientos de libros que van a salir y si me voy a musica los lanzamientos de musica asi .... se que es con un condicional pero no me sale.
este es el codigo :
<?php
if (isset($current_category_id) && ($current_category_id == '0')) {
$expected_query = tep_db_query("select pd.products_sis,p.products_image, p.products_id,p.products_image,p.products_tax_clas s_id,p.products_price, pd.products_name, products_date_available as date_expected from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where to_days(products_date_available) >= to_days(now()) and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " limit " . MAX_DISPLAY_UPCOMING_PRODUCTS);
}else{
$expected_query = tep_db_query("select distinct pd.products_sis,p.products_image, p.products_id,p.products_image,p.products_tax_clas s_id,p.products_price, pd.products_name, products_date_available as date_expected from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRPTION ." pd where to_days(products_date_available) >= to_days(now())and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id ."' order by p.products_ordered desc, pd.products_name limit " .AX_DISPLAY_UPCOMING_PRODUCTS);
}
if (tep_db_num_rows($expected_query) > 0) {
?>
<!-- upcoming_products //-->
<tr>
<td valign="bottom">
<table border="0" width="451" align="center" cellspacing="0" cellpadding="0">
<td class="tableHeading"> <?php echo ; ?> </td>
<td class="tableHeading"> <?php echo TITULO; ?> </td>
<td align="center" class="tableHeading"> <?php echo SISTEMA; ?> </td>
<td align="right" class="tableHeading"> <?php echo LANZAMIENTO; ?> </td>
</tr>
<tr>
<td colspan="2"><?php echo tep_draw_separator(); ?></td>
<td colspan="2"><?php echo tep_draw_separator(); ?></td>
</tr>
<tr>
<?php
$row = 0;
while ($expected = tep_db_fetch_array($expected_query)) {
$row++;
if (($row / 2) == floor($row / 2)) {
echo ' <tr class="upcomingProducts-even">' . "\n";
} else {
echo ' <tr class="upcomingProducts-odd">' . "\n";
}
echo ' <td align="right" class="smallText" bgcolor=white> ' . tep_image(DIR_WS_IMAGES .$expected['products_image'], $expected['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . ' </td>' . "\n" .
' <td class="smallText" bgcolor=white> <img src=images/categories/arrow_right.gif><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $expected['products_id']) . '">' . $expected['products_name'] . '</a> </td>' . "\n" .
' <td align="right" class="smallText" bgcolor=white> ' . $expected['products_sis'] . ' </td>' . "\n" .
' <td align="right" class="smallText" bgcolor=white> <font color=red>' . tep_date_short($expected['date_expected']) . ' </td>' . "\n" .
' <tr><td bgcolor=black><img src=ra.gif></td> <td bgcolor=black><img src=ra.gif></td><td bgcolor=black><img src=ra.gif></td><td bgcolor=black><img src=ra.gif></td>
</tr>' . "\n";
}
?>
<?php echo tep_draw_separator(); ?>
</tr>
</table>
<table border=0 align=center cellspacing="0" cellpadding="0" width=451>
<tr>
<td colspan="2"></td>
</tr>
</table>
</td>
</tr>
<?php
}
?>