We are updating a heavily modified version of zencart 1.3.8 to 1.5.1. We have managed to get all the modules and plugins working again, with the exception of a few extra fields in the manufacturers_info table and categories_description table...
We have edited the following of the 1.5.1 manufacturers page:
PHP Code:
$manufacturers_url_array = $_POST['manufacturers_url'];
$language_id = $languages[$i]['id'];
$sql_data_array = array('manufacturers_url' => zen_db_prepare_input($manufacturers_url_array),
'manufacturers_description' => zen_db_prepare_input($_POST['manufacturers_description']),
'manufacturers_products_description' => zen_db_prepare_input($_POST['manufacturers_products_description'])
);
if ($action == 'insert') {
$insert_sql_data = array('manufacturers_id' => $manufacturers_id,
'languages_id' => $language_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
zen_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array);
} elseif ($action == 'save') {
zen_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array, 'update', "manufacturers_id = '" . (int)$manufacturers_id . "' and languages_id = '" . (int)$language_id . "'");
}
The original fields are saving correctly, and the data from the DB is being put into the new field text area's correctly, but we cannot change the new fields at all. We have changed a few area's to get this working, so if you need another snippet of code let me know. The information is being passed from the form via POST correctly (with the above var names etc)
Bookmarks