csv product import

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Joseph
Posts: 22
Joined: 28 Sep 2022, 07:47

csv product import

Post by Joseph » 13 Dec 2022, 14:42

Hello,

We've been trying to import products via csv file and when executing the crontab, it logs that the cron started and finished, but nothing is imported. Is it an issue with our csv or our settings, or something of sorts? (file path tried with both just the directory and pointer to the file)
Tried the example file found on your docs and our own.

typo3 11.5.10
php 8.12
aimeos 22.10.3

exempt from our csv file:

Code: Select all

"JF0040044","Notizblock mit ESWE Logo DIN A5","default","1",,,"long","Notizblock im Format A5 mit ESWE Logo, kariert.Preis pro Stück","media/notizblock-a5-kariert-mit-logo.png","EUR","1","1.22","7.00",,,,"default",,,,,
"JF0001205","Radiergummi Doppel-Läufer","default","1",,,"long","Die rote Seite radiert Blei-, Farb-, und Kopierstifte, die blaue Seite radiert Tinte, Tusche und Toner. Doppelseitig, mittelweich.Material: Naturkautschuk .Maße: 55 x 19 x 8,5 mmPreis pro Stück","media/radiergummi-doppel-laufer-3.jpeg","EUR","1","0.34","7.00",,,,"default",,,,,
"""JF0001750"",""Additionsrollen (Verkauf einzel)"",""default"",""1"",,,""long"",""Für Tischrechner, elementarchlorfrei (ECF), holzfrei, mit End-Warnstreifen. Grammatur: 60 g/qm.
Preis pro Stück"",""media/additionsrollen-5.jpeg"",""EUR"",""1"",""1.01"",""7.00"",,,,""default"",,,,,"
"JF0001680","Enthefter","default","1",,,"long","Stabile Metallausführung mit rutschfesten Kunststoffgriffen. Löst alle Heftklammern (24/6, Nr. 10) und Reißnägel.Preis pro Stück","media/enthefter.png","EUR","1","0.97","7.00",,,,"default",,,,,
Attachments
Screenshot 2022-12-13 153828.png
Screenshot 2022-12-13 153828.png (7.85 KiB) Viewed 4956 times

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: csv product import

Post by aimeos » 14 Dec 2022, 09:01

The TypoScript configuration isn't valid and must be:

Code: Select all

controller.jobs.product.import.csv.location = /var/...
controller.jobs.product.import.csv.skip-lines = 1
See: https://aimeos.org/docs/latest/typo3/cu ... figuration
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Joseph
Posts: 22
Joined: 28 Sep 2022, 07:47

Re: csv product import

Post by Joseph » 14 Dec 2022, 10:32

Unfortunately, exchanging the slashes with dots did not result in the cronjob importing. It still continues to say that it started and finished.

Code: Select all

Dec 14 11:20:34 webserver3-sandbox systemd[1]: Starting Checkmk agent (10.23.12.141:48796)...
Dec 14 11:20:36 webserver3-sandbox systemd[1]: check-mk-agent@16558-192.168.111.41:6556-10.23.12.141:48796.service: Deactivated successfully.
Dec 14 11:20:36 webserver3-sandbox systemd[1]: Finished Checkmk agent (10.23.12.141:48796).
Dec 14 11:21:01 webserver3-sandbox CRON[3724453]: (root) CMD (/root/shopcronscript.sh > /dev/null 2>&1)

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: csv product import

Post by aimeos » 15 Dec 2022, 07:45

Your log output contains no hints of the importer.
If it starts and ends without further notice, usually no file to import was found.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Joseph
Posts: 22
Joined: 28 Sep 2022, 07:47

Re: csv product import

Post by Joseph » 10 Jan 2023, 13:28

Hi there,

happy new years!

We figured the cron out and all, but now when running the cron it fails, leaving us with this stacktrace:
https://pastebin.com/56dt9ze6

the test file content: https://pastebin.com/sjnjEwi7

nos3
Posts: 87
Joined: 01 Sep 2015, 13:26

Re: csv product import

Post by nos3 » 12 Jan 2023, 09:43

Your test file is wrong because each field is enclosed by """ instead of "

Joseph
Posts: 22
Joined: 28 Sep 2022, 07:47

Re: csv product import

Post by Joseph » 16 Jan 2023, 10:01

hey there,

removed the """ from non-integer fields.
now looking like

Code: Select all

"JF0001205","Radiergummi Doppel-Läufer","default",1,,,"long","Die rote Seite radiert Blei-, Farb-, und Kopierstifte, die blaue Seite radiert Tinte, Tusche und Toner. Doppelseitig, mittelweich.Material: Naturkautschuk .Maße: 55 x 19 x 8,5 mmPreis pro Stück","media/radiergummi-doppel-laufer-3.jpeg","EUR",1,0.34,7.00,,,,"default",,,,,\n 
throws this now.

Code: Select all

 	Started product import from "/var/www/xyz/fileadmin/user_upload/Import" (Aimeos\Controller\Jobs\Product\Import\Csv\Standard)
it never finishes though, and as such nothing is imported.

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: csv product import

Post by aimeos » 17 Jan 2023, 15:30

Is the "\n" at the end of the line really a new line or just a backslash and the character "n"?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Joseph
Posts: 22
Joined: 28 Sep 2022, 07:47

Re: csv product import

Post by Joseph » 17 Jan 2023, 15:37

In this case its a new line.
But we've tried it with /n and without. It doesn't affect the outcome.

Joseph
Posts: 22
Joined: 28 Sep 2022, 07:47

Re: csv product import

Post by Joseph » 20 Jan 2023, 11:29

I also get this error:

503 Oops, an error occurred!
Call to undefined function Aimeos\Controller\Common\Product\Import\Csv\Processor\Text\mb_strcut()

Post Reply