Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Infobox to display product list - some help needed


grooverider

Recommended Posts

OK, what I'm stuggling to do is to create an infobox that will display a list of products from the category you are in and link to those products.

 

I've got this far with making the infobox file:

 

<!-- products //-->

         <tr>

           <td>

<?php

 $info_box_contents = array();

 $info_box_contents[] = array('align' => 'left',

                              'text'  => BOX_HEADING_PRODUCTS

                             );

 new infoBoxHeading($info_box_contents, true, false);

 

  if ($category_depth !== 'products') {

     $products_string = 'Please select a subcategory.';

   }



else {

 

  }



 $info_box_contents = array();

 $info_box_contents[] = array('align' => 'left',

                              'text'  => $products_string

                             );

 new infoBox($info_box_contents);

?>

           </td>

         </tr>

<!-- products_eof //-->

 

Which works as far as it goes - it displays the "Please select a subcategory" text unless you are in the lowest level.

 

The problem is that I'm stuck on how to create a $products_string containing the names of the products in the category I'm in. I've tried hacking various functions and db queries I've found in other files but with no success. Seems this is beyond my PHP abilities :?

 

Can anyone help with this or point me in the right direction?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...