There are in excess of one hundred named constants in osCommerce. Some, as DB_SERVER, are defined in configure.php. They're not meant to be changed once osCommerce is installed.
Most are read from the configuration table. They come from two sources:
- They're created during osCommerce installation (eg STORE_NAME). You can find them in oscommerce.sql;
- They're inserted, or removed, by a module installer (eg MODULE_SHIPPING_TABLE_STATUS).
These constants are meant to be changed — not too often; after all, they're constants. But their values can be set in the admin. The first set is modified in the Configuration section, the second in Modules.
When you're hacking osCommerce, the function of the constant is usually obvious, from its name and the surrounding code. But I sometimes have trouble relating a description in admin to what will actually happen in the software. I need to change PRODUCT_LIST_QUANTITY; is that really Display Product Quantity? It's easy to be sure with this simple modification:
In admin/configuration.php, locate (l. 139 in the original file):
$contents[] =
array('align' =>
'center',
'text' =>
'<a href="...">' . tep_image_button
('button_edit.gif', IMAGE_EDIT
) .
'</a>');
and append the following line:
$contents[] =
array('text' =>
'<br>' .
$cInfo->
configuration_key);
Similarly in MS3:
<?php echo '<b>' .
$cInfo->
configuration_title .
'</b>';
?>
becomes:
<?php echo '<b>' .
$cInfo->
configuration_title .
'</b> (' .
$cInfo->
configuration_key .
')';
?>