New Zenner
- Join Date:
- Sep 2005
- Posts:
- 16
- Plugin Contributions:
- 0
products table master_categories_id set to zero when updating master cats from admin
Hello, I occasionally use a page I created to "batch add" attributes and products. When I am inserting a product into the products table, I just insert the number of the master_categories_id:
Actually, now that I look, I am using zen_db_insert()...
<form method=post>
<input type="text" name="master_categories_id" />
<input type="submit">
</form>
// add posted master_categories_id to my_array
$my_array(
'products_id' => 'null',
'master_categories_id' => $_POST['master_categories_id']
);
zen_db_perform($my_array, TABLE_PRODUCTS);
Now, here's the thing- the category id seems to be inserted into the database just like any other category id would (I make sure to choose good categories, i.e, they have no subcategories, other products are able to be inserted into them just fine)
However, in admin > Tools > Store Manager > Reset ALL Products Master Categories IDs, when I reset them, any IDs I have manually added are set to zero.
I even have other products with identical master_categories_id values that don't get reset!
How can I avoid this behavior?
As a note: the categories do NOT work before the master_categories_reset, either. I they show up fine in the store under "New Products," for example, but do not appear to be associated with the category that I chose for them...
TIA,
-desimo