Thank you chris for your excellent instructions.
I was able to add the field in the DB and collect_info & preview_info and other files but always missed out on update_info.php. After reading through your instructions I redid everything again, and then realized that the update file was right under my nose but always missed it.
I also updated the general.php >> function >> includes >> admin since my additional field required a function.
Now its all sweet.
Just to let everyone know, if you wanna add a field something like product_description, which would need some textarea, I would suggest you to add the extra field at the end of TABLE_PRODUCTS_DESCRIPTION instead of TABLE_PRODUCTS. Also, go through each of the files listed in the instructions (post #1 of this thread) and search for the product_description field and then add your field along with the product_description.
Also, while doing this it is very important that the order of fields as in DB is followed when appending the php commands related to the new field in various sql queries in the files. for a better explaination, if say in the DB of TABLE_PRODUCTS_DESCRIPTION you have fields
product_id
language_id
product_description
product_url
product_viewed
product_XYZ <new field appended into the table>
Now when you modify sql queries, they may be already written as in any of the files mentioned by chris as in the preview_info.php near line 43
PHP Code:
if (isset($_GET['read']) && ($_GET['read'] == 'only')) {
$pInfo->products_name = zen_get_products_name($pInfo->products_id, $languages[$i]['id']);
$pInfo->products_description = zen_get_products_description($pInfo->products_id, $languages[$i]['id']);
$pInfo->products_url = zen_get_products_url($pInfo->products_id, $languages[$i]['id']);
//THIS IS WHERE THE NEW FIELD WILL GO SINCE IT WILL FOLLOW THE ORDER OF FIELDS FROM THE DB TABLE
$pInfo->products_XYZ = zen_get_products_XYZ($pInfo->products_id, $languages[$i]['id']);
} else {
$pInfo->products_name = zen_db_prepare_input($products_name[$languages[$i]['id']]);
$pInfo->products_description = zen_db_prepare_input($products_description[$languages[$i]['id']]);
$pInfo->products_url = zen_db_prepare_input($products_url[$languages[$i]['id']]);
//THIS IS WHERE THE NEW FIELD WILL GO SINCE IT WILL FOLLOW THE ORDER OF FIELDS FROM THE DB TABLE
$pInfo->products_XYZ = zen_db_prepare_input($products_XYZ[$languages[$i]['id']]);
}
Hope this helps someone. Thanks chris.
Bookmarks