lhungil:
Numinex module users:
Make sure your copy of "/admin/configuration.php" includes code calling the defined "use_function" for configuration options. While only a handful of core Zen Cart configuration options define a "use_function", many of the configuration options for Ultimate URLs make use of the "use_function".
The stock Zen Cart code calls the "use_function" (if defined for a configuration option) to determine the correct "value" to display for a configuration option. The stock Zen Cart code calls the "use_function" every time the configuration page is displayed (and leaves room for more creative uses than just display).
Ultimate URLs uses the "use_function" to fire additional "events" (such as checking for valid options / combinations of options). These events in turn "save" the updated / changed configuration options to the database (for Ultimate URLs).
This means if the code in "/admin/configuration.php" does not call the defined "use_function" (at least once), one will not be able to configure Ultimate URLs using the standard Zen Cart "admin"->"configuration"->"Ultimate (SEO) URLs".
**Note: **A special thank you to DivaVocals for directing me to the exact reason for the compatibility conflict between some of the Numinex modules and Ultimate URLs.
And to add to this, it appears that this applies to the PREMIUM versions of Numinix modules (**Google Product Search Feeder **and possibly Fast and Easy Ajax Checkout). For SURE **Google Product Search Feeder **(the "premium" version of Google Merchant Center Feeder) includes a modified /admin/configuration.php file. To correct the errors lhungil describes see the required changes below.
find this section (around lines 75-79):
foreach($_POST as $cfgID => $cfgValue) {
$strpos = strpos($cfgID, 'cfg_');
if ($strpos !== FALSE) {
$cID = zen_db_prepare_input(substr($cfgID, $strpos + 4));
$configuration_value = zen_db_prepare_input($cfgValue);
AFTER this section add this:
// START fix code to correctly utilize the use_function
$queryResult = $db->Execute(
'SELECT `use_function` FROM `' . $configuration_table . '` ' .
'WHERE `configuration_id`=\'' . $cID . '\''
);
if(!$queryResult->EOF && zen_not_null($queryResult->fields['use_function'])) {
$use_function = $queryResult->fields['use_function'];
if (preg_match('/->/', $use_function)) {
$class_method = explode('->', $use_function);
if (!is_object(${$class_method[0]})) {
include(DIR_WS_CLASSES . $class_method[0] . '.php');
${$class_method[0]} = new $class_method[0]();
}
$configuration_value = zen_call_function($class_method[1], $configuration_value, ${$class_method[0]});
} else {
$configuration_value = zen_call_function($use_function, $configuration_value);
}
}
unset($queryResult, $use_function);
// END fix code to correctly utilize the use_function
then at line 213 find this:
echo ' <td class="cl">' . $configuration_option['configuration_title'] . '</td>' . "\n";
replace with this:
echo ' <td class="cl">' . $configuration_option['configuration_title'] . '<br /><small><i>Current Value: ' . $configuration_option['configuration_value'] . '</i></small></td>' . "\n";