Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Products for <MONTH> problem


openmind

Recommended Posts

Hello

 

Thank in advance to anybody that have an idea how to do it. i have read the documentation and i tried anything possible. I am using a 2.1 Version of OSCommerce (in fact Tep - The Ecxhange Project) . I am also using this code in new_products.php

 

<!-- new_products //-->
         <tr>
           <td nowrap>
	 <?php echo FONT_STYLE_TABLE_HEADING; 
	 echo " <b>";
	 echo sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')); 
	 echo "</b> ";
	 echo "</font><br><br>";?>
	 </td>
         </tr>
         
         <tr>
           <td>
	 
   <table border="0" width="100%" cellspacing="0" cellpadding="0">
               <tr> <td>
<?
   if ($new_products_category_id == '0') {
     $new_products_query = tep_db_query("select products_id, products_name, products_price, products_image from products where products_status = '1' order by products_date_added DESC limit " . MAX_DISPLAY_NEW_PRODUCTS);
   } else {
     $new_products_query = tep_db_query("select p.products_id, p.products_name, products_price, p.products_image from products p, products_to_categories p2c, categories c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $new_products_category_id . "' and p.products_status = '1' order by p.products_date_added DESC limit " . MAX_DISPLAY_NEW_PRODUCTS);
   }
   $row = 0;
    while ($new_products = tep_db_fetch_array($new_products_query)) {
  $row++;
  if ((($row / 3) == floor($row / 3)) && ($row != MAX_DISPLAY_NEW_PRODUCS)) {
  //if ($row > 2) {
    echo '              </tr>' . "\n";
       echo '              <tr>' . "\n";
       echo '                <td> </td>' . "\n";
       echo '              </tr>' . "\n"; 
       echo '              <tr>' . "\n";
 
  	 echo" <table border='3' cellpadding='0' cellspacing='0' width='198'>";
     echo' <tbody>';
      echo'  <tr >'; 
      echo"     <td height='35' colspan='2' valign='top' class='promo2title'>"; 
        echo  'uiuiuiui' . FONT_STYLE_MAIN . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id'], 'NONSSL') . '">' . $new_products['products_name'] . '</a></font>' . "\n";
       echo "</td>";
     echo'   </tr>';
      echo'   <tr>';
  	 echo"     <td rowspan='2' align='center' height='80' valign='center' width='70'> "; 
    	 echo FONT_STYLE_MAIN . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id'], 'NONSSL') . '">' . tep_image($new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br></font>' . "\n";
  	 echo"      <td height='30' width='127' id='wow_q_precios'>";
  	 echo"        <table border='0' cellpadding='1' cellspacing='0'>";
  	 echo"          <tbody>";
  	 echo"            <tr>";
  	 echo"              <td><img src='pcw_page_ooo_files/spacer.gif' height='50' width='0'></td>";
  	 echo"              <td width='100%' align='center'><span class='promo2product'> <img src='images/wow_qp_box.gif' width='80' height='42'></span></td>";
  	 echo"            </tr>";
  	 echo"          </tbody>";
  	 echo"      </table></td>";
  	 echo"    </tr>";
  	 echo"    <tr>";
  	 echo"      <td height='40' valign='bottom'>Price Inc VAT: "; echo $new_products['products_price']; echo"</td>";
  	 echo"    </tr>";
  	 echo"    <tr>";
  	 echo"      <td colspan='2' height='43'> caracteristici </td>";
  	 echo"    </tr>";
  	 echo"    <tr background='images/gen_promo2_bg.gif'>";
  	 echo"      <td colspan='2'><table width='198' border='0' cellspacing='0' cellpadding='0'>";
  	 echo"        <tr>";
  	 echo"          <td height='32' background='images/gen_promo2_bg.gif'><table border='0' cellpadding='2' cellspacing='0' height='30' width='198'>";
  	 echo"            <tbody>";
  	 echo"              <tr>";
  	 echo"                <td width='94' align='right' valign='middle'>";
  	 echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id'], 'NONSSL') . '">' . '<img src="images/gen_viewproduct.gif" border=0>' . '</a>';
  	 echo "    </td>";
  	 echo"              </tr>";
  	 echo"            </tbody>";
  	 echo"          </table>";
  	 echo"        </td></tr>";
  	 echo"      </table></td></tr><br>"; 
  	 
     }


   } 
?>
         
           </table>
	 </td>
         </tr>

 <!-- new_products_eof //-->

 

I put the products in some tables. I think there is something fishy. maybe i am blind :huh: but i just can?t see what?s wrong.

 

Please post your idea. it might be helpfull.

 

Thank you very much for your time and consideration.

 

Greets,

Adrian

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...