CSV Import removes Attributes

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!
rvhelp2
Posts: 29
Joined: 29 Oct 2022, 10:10

CSV Import removes Attributes

Post by rvhelp2 » 18 Nov 2022, 09:35

Wer are trying to import a CSV Product list. Just the Attribute "liefertyp" should be overrided. Other Attributes like "power" or "length" should not be removed. We tried with the "processor.product.listtypes" setting, but it has no effect.

I assumed that only the listed Attributes will be modified?

Code: Select all

plugin.tx_aimeos {
	settings {
		controller.jobs.product.import.csv {
			processor.product.listtypes {
				0 = liefertyp
			}
			strict = 0
			mapping {
				item {
					0 = product.code
					1 = product.label
					27 = product.type
					26 = product.status
					#47 = product.config
				}
				price {
					# preis default
					3 = price.value
					29 = price.currencyid
					15 = price.type
					4 = price.taxrate
					48 = price.rebate

					# preis spezial aktion
					5 = price.value
					31 = price.currencyid
					33 = price.type
					6 = product.lists.datestart
					7 = product.lists.dateend
					34 = price.taxrate
					30 = price.rebate
					35 = price.status

					# preis spezial
					#36 = price.value
					#37 = price.currencyid
					#38 = price.type
					#39 = price.taxrate
					#43 = price.status
				}
				attribute {
					44 = attribute.type (in csv file "0")
					45 = attribute.code (in csv file "liefertyp")
					46 = product.lists.typeid (in csv file "lieferunglkw")
				}
				property {
					14 = product.property.value
					28 = product.property.type

					16 = product.property.value
					40 = product.property.type

					18 = product.property.value
					41 = product.property.type

					17 = product.property.value
					42 = product.property.type
				}
			}
		}
	}
}

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

Re: CSV Import removes Attributes

Post by aimeos » 19 Nov 2022, 08:11

The CSV importer is "all or nothing" and you can't updated attributes partially because then, the importer would be unable to remove old attributes. The "listtype" configuration allows to you to selectively update only a group of attributes with the same list type but you want to update attributes partially with the same list type ("default").

The only way to do that is to create your own importer or overwrite the standard product attribute CSV importer for that case.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rvhelp2
Posts: 29
Joined: 29 Oct 2022, 10:10

Re: CSV Import removes Attributes

Post by rvhelp2 » 25 Nov 2022, 09:50

We created our own Command to Import CSV. Thanks

Post Reply