I've been attempting to add some custom fields to my osCommerce 2.3 installation. These fields (products_lot, products_location, products_serial_number, products_note
)are all displaying as they should, and they all pull from a products_description
table in my database. I'm migrating a database that already has these rows, and each field is displaying (pulling) field values exactly as I would expect.
However, when I try to save new values or update an existing product to these rows, it throws a 1054 error: 1054 - Unknown column 'products_lot' in 'field list'
If I move the tep_db_prepare_input()
portion for these fields into a different array with product_description
, the error isn't thrown, but none of the values actually save to the database. It either chops up those fields, or saves nothing at all where previously there was data. For instance, adding '5' to Products Location: yeilds a big fat nil in the database.
TL;DR It pulls the info just fine, but it fails to save it all, and I'm not sure why . . .
Here's the categories.php
file I'm working with to create and store these fields:
http://pastebin.com/raw.php?i=wHrddQyq
All MySQL rows are named to match, so products_description
table has products_lot
, etc.