CSV import: text items, different language, same content

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!
boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

CSV import: text items, different language, same content

Post by boettner » 14 Mar 2019, 15:16

Hi all,

I have a CSV product import with text elements in two languages. When text elements in one row of the import data have the same text.type and text.content the last element of the pair get´s imported the first is ignored.

Does anybody know how to overcome this without altering the content of one of the two?

Cheers
Robert.

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

Re: CSV import: text items, different language, same content

Post by aimeos » 15 Mar 2019, 09:48

Can you post you CSV mapping and an example?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: CSV import: text items, different language, same content

Post by boettner » 15 Mar 2019, 09:59

Thanks for asking:

Code: Select all

plugin.tx_aimeos {
    settings {
            mapping {
                item {
                    0 = product.code
                    1 = product.label
                    2 = product.type
                    3 = product.status
                }

                text {
                    4 = text.type
                    5 = text.languageid
                    6 = text.content
                    7 = text.type
                    8 = text.languageid
                    9 = text.content
                    10 = text.type
                    11 = text.languageid
                    12 = text.content
                    13 = text.type
                    14 = text.languageid
                    15 = text.content
                    16 = text.type
                    17 = text.languageid
                    18 = text.content
                    19 = text.type
                    20 = text.languageid
                    21 = text.content
                    22 = text.type
                    23 = text.languageid
                    24 = text.content
                    25 = text.type
                    26 = text.languageid
                    27 = text.content
                }

                media {
                    28 = media.url
                }

                price {
                    29 = price.currencyid
                    30 = price.quantity
                    31 = price.value
                    32 = price.taxrate
                    33 = customer.group.code
                    34 = price.currencyid
                    35 = price.quantity
                    36 = price.value
                    37 = price.taxrate
                    38 = customer.group.code
                    39 = price.currencyid
                    40 = price.quantity
                    41 = price.value
                    42 = price.taxrate
                    43 = customer.group.code
                    44 = price.currencyid
                    45 = price.quantity
                    46 = price.value
                    47 = price.taxrate
                    48 = customer.group.code
                }

                stock {
                    49 = stock.stocklevel
                    50 = stock.type
                }

                attribute {
                    51 = attribute.code
                    52 = attribute.type
                }

                product {
                    53 = product.code
                    54 = product.list.type
                }

                property {
                    55 = product.property.value
                    56 = product.property.type
                    57 = product.property.value
                    58 = product.property.type
                    59 = product.property.value
                    60 = product.property.type
                    61 = product.property.value
                    62 = product.property.type
                }

                catalog {
                    63 = catalog.code
                    64 = catalog.list.type
                    65 = catalog.code
                    66 = catalog.list.type
                    67 = catalog.code
                    68 = catalog.list.type
                    69 = catalog.code
                    70 = catalog.list.type
                    71 = catalog.code
                    72 = catalog.list.type
                }
            }
        }
    }
}
and the csv:

Code: Select all

"item code","item label","item type","item status","text type","text languageid","text content","text type","text languageid","text content","text type","text languageid","text content","text type","text languageid","text content","text type","text languageid","text content","text type","text languageid","text content","text type","text languageid","text content","text type","text languageid","text content","media url","price currencyid","price quantity","price value","price tax rate","price customer group","price currencyid","price quantity","price value","price tax rate","price customer group","price currencyid","price quantity","price value","price tax rate","price customer group","price currencyid","price quantity","price value","price tax rate","price customer group","stocklevel","stock type","attribute code","attribute type","subproduct code","product list type","property value","property type","property value","property type","property value","property type","property value","property type","catalog code","catalog list type","catalog code","catalog list type","catalog code","catalog list type","catalog code","catalog list type","catalog code","catalog list type"
"00 995 30 80 0","Magnet 12V","default","1","matno","de","0099530800","name","de","Magnet  12V","short","de","Magnet  12V","long","de","Magnet 12V
für Zusatzverriegelung
und Begrenzer 200 Flach
10mm Hub; IP40
Typ MGLE050.50006
Kendrion
Kurve ""B""","matno","en","0099530800","name","en","Magnet 12V","short","en","Magnet 12V","long","en","Magnet 12V
for lock keeper
and governor 200 flat
10mm stroke; IP40
Type MGLE050.50006
Kendrion
cam ""B""","../../fileadmin/shop/images/0099530800.jpg","EUR","1","1","0","wholesale","EUR","1","1","0","largesize","EUR","1","1","0","midsize","EUR","1","1","0","smallsize","99999999","default","","","","","0,692","package-weight","124","package-length","50","package-width","66","package-height","emergencybreak","default","overspeed","default","","","","","",""
uploading *.csv files is not allowed in the forum...

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

Re: CSV import: text items, different language, same content

Post by aimeos » 16 Mar 2019, 12:44

That's an issue in the implementation due to some optimization. We've fixed that in the current 2018.10.x-dev branch:
https://github.com/aimeos/ai-controller ... 8a9bc250fa

Can you please give it a try?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: CSV import: text items, different language, same content

Post by boettner » 18 Mar 2019, 07:40

Thanks for mentioning the patch. Tested on 18.10.7 it does not work. The behavior stays the same.

I also had to change the $typecode variable name declaration to $listtype in the patch.

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

Re: CSV import: text items, different language, same content

Post by aimeos » 18 Mar 2019, 09:11

The variable problem has been fixed in the next patch not linked. Do you know what could be the source of your problem?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: CSV import: text items, different language, same content

Post by boettner » 18 Mar 2019, 09:19

I guess the cause is not respecting the language when filling the mapping array, like your fixed in the patch.

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

Re: CSV import: text items, different language, same content

Post by aimeos » 19 Mar 2019, 09:20

But you said the patch didn't fix the problem?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: CSV import: text items, different language, same content

Post by boettner » 19 Mar 2019, 09:28

Than I maybe misunderstood your question of what would be the source of my problem? I didn´t know when initially asking here and looking at the patch you offered the fix seemed right but doesn´t work here. The behavior ist still the same like I explained in my first post.

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

Re: CSV import: text items, different language, same content

Post by aimeos » 20 Mar 2019, 10:31

We've added some tests to see if the problem has been solved and they succeed:
https://github.com/aimeos/ai-controller ... 9e7c41513f

Did we misunderstand the problem?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply