Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Manufacturers.php - Code Queries


Guest

Recommended Posts

Posted

Hi

 

I am trying to use the manufacturers.php code as the basis to write a two new modules to enable user input/edit pages for a couple of custom fields

 

Please can someone guide me on the following;

 

What is the variable 'mID'?

 

It appears to be used extensively but I cannot find reference to its importance. For example

if (isset($HTTP_GET_VARS['mID']))

 

 

Circa line 143 there is the following code

 

 $manufacturers_query_raw = "select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from " . TABLE_MANUFACTURERS . " order by manufacturers_name";
 $manufacturers_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $manufacturers_query_raw, $manufacturers_query_numrows);
 $manufacturers_query = tep_db_query($manufacturers_query_raw);
 while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
if ((!isset($HTTP_GET_VARS['mID']) || (isset($HTTP_GET_VARS['mID']) && ($HTTP_GET_VARS['mID'] == $manufacturers['manufacturers_id']))) && !isset($mInfo) && (substr($action, 0, 3) != 'new')) {
  $manufacturer_products_query = tep_db_query("select count(*) as products_count from " . TABLE_PRODUCTS . " where manufacturers_id = '" . (int)$manufacturers['manufacturers_id'] . "'");
  $manufacturer_products = tep_db_fetch_array($manufacturer_products_query);

  $mInfo_array = array_merge($manufacturers, $manufacturer_products);
  $mInfo = new objectInfo($mInfo_array);
}

 

Can someone explain what is happening here please. what is certain is that the variable $mInfo is used extensivley thereafter.

 

 

Thank you

 

Nossum

Archived

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

×
×
  • Create New...