CSV Product Import not working

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
vishal_thakur
Posts: 13
Joined: 28 Jul 2021, 11:59

Re: CSV Product Import not working

Post by vishal_thakur » 06 Aug 2021, 07:03

here is my csv file :

Code: Select all

item code,item label,item type,item status,text type,text content,text type,text content,media label,media url,price currencyid,price quantity,price value,price tax rate,price currencyid,price quantity,price value,price tax rate,catalog code,catalog list type,property value,property type,property value,property type,property value,property type,property value,property type,stock level,stock type,stock dateback,attribute code,attribute type,subproduct code,product list type
dish_soap,DISH SOAP BOTTLE-YEL-500,default,1,long,DISH SOAP BOTTLE-YEL-500,short,DISH SOAP BOTTLE/YEL/500,DISH SOAP BOTTLE-YEL-500,,USD,1,200,0,GBP,1,259.99,0,home,promotion,0.1875,package-weight,0.125,package-length,0.75,package-width,0.25,package-height,4.9,default,default,,,,

here is my complete mapping configuration :

Code: Select all

	'controller' => [
		    'jobs' => array(
		      'product' => array(
		        'import' => array(
		          'csv' => array(
		            'location' => base_path('tmp'),
		            'skip-lines' => 1,
		            'mapping'=>[
						    'item' => [
						        0 => 'product.code', // e.g. unique EAN code
						        1 => 'product.label', // UTF-8 encoded text, also used as product name
						        2 => 'product.type', // type of the product, e.g. "default" or "selection"
						        3 => 'product.status', // enabled (1) or disabled (0)
						    ],
						    'text' => [
						        4 => 'text.type', // e.g. "short" for short description
						        5 => 'text.content', // UTF-8 encoded text
						        6 => 'text.type', // e.g. "long" for long description
						        7 => 'text.content', // UTF-8 encoded text
						    ],
						    'media' => [
						    	8 => 'media.label', // UTF-8 encoded text, also used as product name
						        9 => 'media.url', // relative URL of the product image on the server
						    ],
						    'price' => [
						        10 => 'price.currencyid', // three letter ISO currency code
						        11 => 'price.quantity', // the quantity the price (for block pricing)
						        12 => 'price.value', // price with decimals separated by a dot
						        13 => 'price.taxrate', // tax rate with decimals separated by a dot
						        14 => 'price.currencyid', // three letter ISO currency code
						        15 => 'price.quantity', // the quantity the price (for block pricing)
						        16 => 'price.value', // price with decimals separated by a dot
						        17 => 'price.taxrate', // tax rate with decimals separated by a dot						        
						    ],
						    'catalog' => [
						        18 => 'catalog.code', // e.g. Unique category code
						        19 => 'catalog.lists.type', // e.g. "promotion" for top seller products
						    ],
						    'property' => [
						        20 => 'product.property.value', // arbitrary value for the corresponding type
						        21 => 'product.property.type', // e.g. "package-weight"
						        22 => 'product.property.value', // arbitrary value for the corresponding type
						        23 => 'product.property.type', // e.g. "package-weight"						        
						        24 => 'product.property.value', // arbitrary value for the corresponding type
						        25 => 'product.property.type', // e.g. "package-weight"						        
						        26 => 'product.property.value', // arbitrary value for the corresponding type
						        27 => 'product.property.type', // e.g. "package-weight"						        
						    ],
						    'stock' => [
						        28 => 'stock.stocklevel',
						        29 => 'stock.type',
						        30 => 'stock.dateback',
						    ],
						    'attribute' => [
						        31 => 'attribute.code', // code of an attribute, will be created if not exists
						        32 => 'attribute.type', // e.g. "size", "length", "width", "color", etc.
						    ],
						    'product' => [
						        33 => 'product.code', // e.g. EAN code of another product
						        34 => 'product.lists.type', // e.g. "suggestion" for suggested product
						    ],
						],

		          )
		        )
		      )
		    ),
	],

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

Re: CSV Product Import not working

Post by aimeos » 06 Aug 2021, 08:03

Your problem is the "stock.dateback" column, which contains "default" in your file and this is invalid
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

vishal_thakur
Posts: 13
Joined: 28 Jul 2021, 11:59

Re: CSV Product Import not working

Post by vishal_thakur » 06 Aug 2021, 08:42

thank you so much :)
problem is now solved

Post Reply