Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product tree problem


Guest

Recommended Posts

Posted

I installed this contribution today: http://www.oscommerce.com/community/contri...ions,912/page,3

 

And am not getting it to work as I want it to. As you can see on the picture below the product is too far down. If a remove the <br> from the code below the product comes at the same line as the category and <p> don?t work either. I want the product to be just under the category. Any ideas?

 

osc-product_tree.png

 

    $products_in_category_query = tep_products_in_category($counter);



   while ($products_in_category = tep_db_fetch_array($products_in_category_query)) {

         $product_id_h = 'products_id='.$products_in_category ['product_id'];

         $product_name_h = $products_in_category ['product'];

         $categories_string .= '<br>   <span class="boxText"><a href="'. tep_href_link(FILENAME_PRODUCT_INFO, $product_id_h). '">' .$product_name_h . '</a></span>';



  }

Posted

Comeon... someone must know where some simple line breaks come from?

Posted

Okay, I found this in the source html-code.

 

<table border="0" width="100%" cellspacing="0" cellpadding="0"> 

 <tr> 

   <td height="14" class="infoBoxHeading"><img src="images/infobox/thema/3/corner_left.gif" border="0" alt="" width="8" height="19"></td> 

   <td width="100%" height="14" class="infoBoxHeading">Kategorier</td> 

   <td height="14" class="infoBoxHeading"><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td> 

 </tr> 

</table> 

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> 

 <tr> 

   <td> 

     <table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> 

      <tr> 

         <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> 

       </tr> 

       <tr> 

         <td align="left" class="boxText"> 

           <a href="http://localhost/catalog/default.php?cPath=22"><b>Pen drive</b></a>&(2)<br> 

           & nbsp;& nbsp;& nbsp;<span class="boxText"><a href="http://localhost/catalog/product_info.php?products_id=31"></a></span><br> 

           & nbsp;& nbsp;& nbsp;<span class="boxText"><a href="http://localhost/catalog/product_info.php?products_id=30"></a></span><br> 

           & nbsp;& nbsp;& nbsp;<span class="boxText"><a href="http://localhost/catalog/product_info.php?products_id=31"></a></span><br> 

           & nbsp;& nbsp;& nbsp;<span class="boxText"><a href="http://localhost/catalog/product_info.php?products_id=31"></a></span><br> 

           & nbsp;& nbsp;& nbsp;<span class="boxText"><a href="http://localhost/catalog/product_info.php?products_id=30"></a></span><br> 

           & nbsp;& nbsp;& nbsp;<span class="boxText"><a href="http://localhost/catalog/product_info.php?products_id=30"></a></span><br> 

           & nbsp;& nbsp;& nbsp;<span class="boxText"><a href="http://localhost/catalog/product_info.php?products_id=30">USB 1.1 128 mb</a></span><br> 

           & nbsp;& nbsp;& nbsp;<span class="boxText"><a href="http://localhost/catalog/product_info.php?products_id=31">USB 1.1 256 MB</a></span><br> 

         </td> 

       </tr> 

       <tr> 

         <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> 

       </tr> 

     </table> 

   </td> 

 </tr> 

</table>

 

Can someone explain why there is six empty links??!! Am not so good at php so I don?t have a clue.

Archived

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

×
×
  • Create New...