Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding Column to /admin/categories.php display


Guest

Recommended Posts

Posted

Curious to know what I would need to place in the file /admin/categories.php or any other various file to add the products_model data to be outputted in the admin section when you goto a category.

 

When you are browsing products (admin screen) under categories, I would like the Product Number (model no.) to also be outputting in a seperate column.. i found this in /admin/categories.php:

 

                <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td>
               <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td>
               <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>

 

However I am unable to find any available method of outputting the column information from the table products_

 

Any assistance or suggestions, how-to's etc I would appreciate.

 

Thanks

Posted

I tried adding the following to the snippet, found on line 764 in categories.php

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td>
   <? $products_model_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_weight, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, m.manufacturers_id, m.manufacturers_name from " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id ");
      $productmodel=$products_model['p.products_model']; ?>
   <td class="dataTableHeadingContent"><?php echo $productmodel?></td>
               <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td>
               <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>

 

No worky... no parse errors tho either :)

  • 3 months later...

Archived

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

×
×
  • Create New...