Closed chaddro closed 12 years ago
If you have a mix of manufacturers_id set to 0 and '' (NULL) you can fix this by running this command under Tools > Install SQL Patches:
UPDATE products
SET manufacturers_id
= 0 WHERE manufacturers_id
is null;
This will change all null values to 0.
Came across this issue today. Old versions of EP would enter a NULL value in the products table for entries where no manufacturer is assigned. But, when you add a new product from within the zencart admin, and do not assign a manufacturer, the admin defaults this to zero.
Zero, for zencart, means no manufacturer. ID's in the manufacturer's table start at 1, not zero.
The code currently tests for '0'. If there are NULL values, this can through an error. For best compatibility, I should test for both possibilities. However, 0 is the "correct" value.