Hi,
I am trying to import products using the XML format. I have exported current products to get a template file, added my products and than tried to import the file back. However the import fails - the UI does not show anything but I get 500 HTTP error with this messageThis is how the elements for each product look like. I have not touch those so they are the same as they were generated during export.I think the problem is in the import procedure This code converts 0 and '0' to empty string ('') which results in setting column stockstatus_a_id to invalid value.
This code is the same in versions 4.0.9, 4.0.10 and 5.0.0b20.
I am trying to import products using the XML format. I have exported current products to get a template file, added my products and than tried to import the file back. However the import fails - the UI does not show anything but I get 500 HTTP error with this message
Code:
{ "error": true, "code": 0, "message": "Incorrect integer value: '' for column 'stockstatus_a_id' at row 1"}
Code:
... <stockstatus_a_id>0</stockstatus_a_id> <stockstatus_n_id>0</stockstatus_n_id> ....
Code:
admin/layouts/product_import.php@527
Code:
// correct simple xml foreach($data as $k => $v) { if (empty($v)) { $data[$k] = ''; } }
This code is the same in versions 4.0.9, 4.0.10 and 5.0.0b20.
Statistics: Posted by michal.riha — 20 Jan 2024, 09:25