[ic] Having trouble with product options
Janine A Sisk
janine at furfly.net
Thu Oct 14 16:22:47 EDT 2004
I can't seem to get product option data to load. and I'm wondering if
it's my own problem, or if I've run into a bug. I have RTFM'd but
didn't find much info about this process.
We entered some product options through the admin UI, but decided that
was going to take forever. So I exported the data already in the table
and added to it. No go; each time I tried to upload I got this error:
DBD::Pg::st execute failed: ERROR: ExecInsert: Fail to add null value
in not null attribute sku at /usr/lib/interchange/lib/Vend/Table/DBI.pm
line 1386, line 20.
If I just import the unchanged export file it's fine, but if I add even
one line of my own, it fails. The obvious assumption would be that my
data is malformed, but I don't see anything wrong with it. In the
following snippet, 10057 was added through the GUI and 10058 is mine:
100057^I01-70032^IWrap^I^I^IGift
Wrap^I1=Yes,0=No*^Iradio^I^I^I^I1=4.50^I^I$
100058^I05-18156^IWrap^I^I^IGift
Wrap^I1=Yes,0=No*^Iradio^I^I^I^I1=4.50^I^I$
(for the non-vi users out there, each ^| represents one tab character
and $ is end-of-line)
Both skus exist in the product table.
I've turned on debugging and uncommented some debug code in DBI.pm,
which shows that this is what's happening:
Vend::Table::DBI:debug: set_row query=INSERT INTO options VALUES (?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Vend::Table::DBI:debug: set_row fields='100058,,,,,,,,,'
So the error message is accurate (it's trying to insert a null into
sku), but doesn't tell me why it's not parsing the line properly.
I am wondering if the parsing is working at all - I can see from the
debug log that this code is not being executed at all for the options
that already exist, so the fact that they don't generate any errors
doesn't really mean much. At least it's not the confirmation that my
data is bogus that I assumed it was at first.
Lastly, I inserted the data for one product into the database by hand,
via psql. It shows up in the options table but the option is not
showing up on the product page, so obviously there is something else
that needs to happen that I'm unaware of.
Thoughts? At the moment I am equally interested in either getting the
option upload to work, or in knowing what other steps I have to
complete in order to insert the data directly into the database and
have it Just Work. Either way is fine if we can just get this working.
Thanks in advance!
janine
More information about the interchange-users
mailing list