Attributes import Warning

Developer
از کشور Hungary
عضو از ژوئیهٔ 2017

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?

Developer
از کشور Hungary
عضو از ژوئیهٔ 2017

Hi Tim!

Works in English but can only import 1 value for group values.

tim
Founder
از کشور Sweden
عضو از مهٔ 2013
tim

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
از کشور Sweden
عضو از مهٔ 2013
tim

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?

Developer
از کشور Hungary
عضو از ژوئیهٔ 2017

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.

This thread has been closed due to long inactivity. Posting to it is not possible.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.