jamie Developer Fra Hungary Medlem siden jamie 26 jan. 2022 09:34 Hi! I encountered a problem importing the attributes. I'm getting the following error message: Creating a batch of 58 lines for processing Processing batch... Inserting new attribute group on line 1 Warning: Creating default object from empty value in ~/vqmod/vqcache/vq2-admin_catalog.app_csv.inc.php (Line 131) Notice: Undefined index: values in ~/vqmod/vqcache/vq2-admin_catalog.app_csv.inc.php (Line 136) Warning: array_column() expects parameter 1 to be array, null given in ~/vqmod/vqcache/vq2-admin_catalog.app_csv.inc.php (Line 136) Warning: array_search() expects parameter 2 to be array, null given in ~/vqmod/vqcache/vq2-admin_catalog.app_csv.inc.php (Line 136) Fatal error: Uncaught Error: Call to undefined method stdClass::save() in C:\xampp\htdocs\l233\vqmod\vqcache\vq2-admin_catalog.app_csv.inc.php:166 Stack trace: #0 C:\xampp\htdocs\l233\admin\index.php(139): include() #1 {main} thrown in C:\xampp\htdocs\l233\vqmod\vqcache\vq2-admin_catalog.app_csv.inc.php on line 166 I also tried the demo page and I get an error message there: Creating a batch of 58 lines for processing Processing batch... Inserting new attribute group on line 1 Fatal error: Uncaught Error: Attempt to modify property "data" on null in demo.litecart.net/public_html/admin/catalog.app/csv.inc.php:131 Stack trace: #0 demo.litecart.net/public_html/admin/index.php(139): include() #1 {main} thrown in demo.litecart.net/public_html/admin/catalog.app/csv.inc.php on line 131 I have attached my import csv file. The import file matches the export file, so it should work. Anyone have an idea? attributes-hu (1).csv
tim Founder Fra Sweden Medlem siden tim 27 jan. 2022 01:43 Confirmed, thank you. Does this solve your problem? https://github.com/litecart/litecart/commit/11a2f8140d316575817168bb48e07654b5dedb9e
jamie Developer Fra Hungary Medlem siden jamie 30 jan. 2022 10:18 Hi Tim! Works in English but can only import 1 value for group values.
tim Founder Fra Sweden Medlem siden tim 30 jan. 2022 22:58 Something is not right here. I need to take this back to the drawing board. Sorry about the inconvenience. But happy you addressed it for me.
tim Founder Fra Sweden Medlem siden tim 30 jan. 2022 23:55 Ok so here comes an attempt for fixing importing of attributes: https://github.com/litecart/litecart/commit/9375b6603feff0d51870efb0b818adc6328c0a8e When an attribute group is created and is then defined again on the next line you need to check [x] Overwriting existing for that line to process. If this is not logic the only solution I can think of is to split the feature into importing Groups and Values separately as two different formats. Can you do some thinking and get back to me if a separation would be more logic or convenient?
jamie Developer Fra Hungary Medlem siden jamie 31 jan. 2022 08:16 It imported the attributes smoothly, but only adds a value of 1. If I export and modify the export file and add the values then everything is fine. This can be a bit cumbersome for someone who doesn't touch it but works. Maybe it would be worthwhile to divide it into groups and values.