#product importer

32 messages · Page 1 of 1 (latest)

signal lanceBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

sage karma
#

Becuase it found 10 but couldn't mport any. IT tells you to download the information aboutn the fairly rows

wide geyser
#

yes but when i try to download the report i get redirected to the customer login. i am not sure why that's happeniung. i am logged in as the admin

sage karma
#

Go to the custom login and try to download it, seems like the download is linked to there

wide geyser
#

Yes but why is this the case and where can I change this

wide geyser
#

Anyone else? I need to set the guard

wide geyser
#

Reason for asking here to get some direction

sage karma
#

Are your panels different Auths?

wide geyser
#

No I have solved it by defining the guards in Auth.php

#

I will share this. But importing is still not working while I get a success message.

sage karma
wide geyser
#

Could you explain more

sage karma
#

Sorry sounds like the import found exisitng records so they wouldn't be added if they existed? you'll need to debug the routine of importing

wide geyser
#

No thr database is empty

wide geyser
#

i am getting this errors when importing

#

ID,Name,Slug,Description,Images,Media,Parent,Visibility,Tags,Data,error 2259,"Computer Accessories",computer-accessories,null,/images/default_image.png,,,Visible,,,,,,,,,,,,"The iD field must be an integer. The name field is required." 2265,"Ergonomic Tools",ergonomic-tools,null,/images/default_image.png,,,Visible,,,,,,,,,,,,"The iD field must be an integer. The name field is required." 2448,"Office Furniture",office-furniture,null,/images/default_image.png,,,Visible,,,,,,,,,,,,"The iD field must be an integer. The name field is required." 2452,"Office Accessories",office-accessories,null,/images/default_image.png,,,Visible,,,,,,,,,,,,"The iD field must be an integer. The name field is required." 2453,"Office Equipment",office-equipment,null,/images/default_image.png,,,Visible,,,,,,,,,,,,"The iD field must be an integer. The name field is required."

#

The iD field must be an integer. The name field is required.

sage karma
#

There is your issue. You have the field in your db as: iD but are setting it as ID in your file.
But also, setting 'name' field as required by having 'Name' in the database.

Ensure you are following the correct name cases in building the importer and your db.

sage karma
#

in here, upload the files. The migration, the model and the importer.

wide geyser
#

I am having a problem to import json data

wide geyser
#

This is in the database but when I am exporting the data it is different in excel

{"featured":true,"priority":1,"weather_resistant":true,"materials":["wood","metal","synthetic"]}
{"featured":false,"priority":3,"compatible":["zigbee","wifi","bluetooth"]}

{"featured":true,"priority":1,"banner_text":"Hardware Solutions"}
{"featured":true,"priority":1,"compatible":["alexa","google","homekit"]}

sage karma
#

That sounds like the data isn't added to the exporter?

wide geyser
#

yes and why is this?

wide geyser
#

this is in the database

sage karma
#

Not sure, not making much sense tbh, I would debug it bit by bit as nothing seems to show why. it would be removed.

wide geyser
#

you can check in the table which attributes i have there

sage karma
#

I can see it because I checked, which is why I said it's not making much sense, so debug it bit by bit in the code.

wide geyser
#

in the description field in the database i am seeing this.

```{"type":"doc","content":[{"type":"paragraph","attrs":{"class":null,"style":null,"textAlign":"start"}```

why is the content not visible? iam using tiptapeditor

sage karma
#

I do not know.... from what I gather it should be ok. So just debug your code? put some dd()'s in and find out the cause.

wide geyser
#

what does this do. it doesn't work

->listAsJson()

narrow drift
#

Can you try changing the delimiter for the export and import. I’m thinking that the commas in the json stings might be corrupting the export data.