I'm currently trying to write my own product type for ZenCart 1.5. One of the fields on the collect_info page is supposed to enter a BLANK (null) value into the table. However, on the loading of the page, I noticed that instead of entering a null value, the script is inserting a value of zero (0). Does anyone know how I should I be doing the insert to make sure the NULL VALUE is inserted?
Here is the insert statement as in my update_product.php:
PHP Code:
//// INSERT PRODUCT-TYPE-SPECIFIC *INSERTS* HERE //////
$cfv_data_array = array('products_id' => $products_id,
'grade' => zen_db_prepare_input($_POST['grade']),
'nation_id' => zen_db_prepare_input($_POST['nation_id']),
'clan_id' => zen_db_prepare_input($_POST['clan_id']),
'race' => zen_db_prepare_input($_POST['race']),
'rarity_id' => zen_db_prepare_input($_POST['rarity']),
'trigger_id' => zen_db_prepare_input($_POST['trigger_id']),
'skill_id' => zen_db_prepare_input($_POST['skill_id']),
'power' => zen_db_prepare_input($_POST['power']),
'shield' => zen_db_prepare_input($_POST['shield']),
'critical' => zen_db_prepare_input($_POST['critical']),
'flavor_text' => zen_db_prepare_input($_POST['flavor_text'])
);
zen_db_perform(TABLE_CFV_CARDS, $cfv_data_array);
//// *END OF PRODUCT-TYPE-SPECIFIC INSERTS* ////////
Bookmarks