Stock not working

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Bevi
Posts: 33
Joined: 25 Sep 2017, 20:57

Stock not working

Post by Bevi » 11 Oct 2017, 18:32

Whenever I try to buy any of my products I get these two errors:
-Products out of stock
-product.stock.notenough

Here's my mapping:

Code: Select all

    $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. "short" for short description

						7 => 'text.content', // UTF-8 encoded text
						
						8 => 'text.languageid',
						
						9 => 'text.type', // e.g. "short" for short description

						10 => 'text.content', // UTF-8 encoded text
						
						11 => 'text.languageid',
																														
					],
					
					'media' => [
						
						12 => 'media.type', 
						
						13 => 'media.url', // relative URL of the product image on the server
						
						14 => 'media.type', 
						
						15 => 'media.url', // relative URL of the product image on the server
						
						16 => 'media.type', 
						
						17 => 'media.url', // relative URL of the product image on the server
						
						18 => 'media.type', 
						
						19 => 'media.url', // relative URL of the product image on the server
						
						20 => 'media.type', 
						
						21 => 'media.url', // relative URL of the product image on the server

					],
					
					'price' => [

						//32 => 'price.quantity', // the quantity the price is valid from (for block pricing)
						
						22 => 'price.type',

						23 => 'price.value', // price with decimals separated by a dot, no thousand separator		

						24 => 'price.currencyid',

						25 => 'price.taxrate', // tax rate with decimals separated by a dot

					],
					
					'attribute' => [
					
					],
					/*
					'product' => [

						14 => 'product.code', // e.g. EAN code of another product

						15 => 'product.lists.type', // e.g. "suggestion" for suggested product

					],

					'property' => [

						16 => 'product.property.value', // arbitrary value for the corresponding type

						17 => 'product.property.type', // e.g. "package-weight"

					],
					*/
					'catalog' => [

						26 => 'catalog.code', // e.g. Unique category code

						//19 => 'catalog.lists.type', // e.g. "promotion" for top seller products

					],
					'stock' => [

						27 => 'product.stock.stocklevel', // e.g. Unique category code
						28 => 'product.stock.warehouseid',
					],	
        ];
and the first record of my csv:

Code: Select all

0002-03VE,Modellismo,default,1,short,Carisma,short,GT24T MICRO 4WD MONSTER TRUCK/ RTR,fr,short,GT24T MICRO 4WD MONSTER TRUCK/ RTR  ,de,default,../../grafica/FotoModellismo/Neidhardt/0002-03VE_1.jpg,default,../../grafica/FotoModellismo/Neidhardt/0002-03VE_2.jpg,default,../../grafica/FotoModellismo/Neidhardt/0002-03VE_3.jpg,default,../../grafica/FotoModellismo/Neidhardt/0002-03VE_4.jpg,default,../../grafica/FotoModellismo/Neidhardt/0002-03VE_5.jpg,default,0,CHF,8,3,100000,default  

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

Re: Stock not working

Post by aimeos » 11 Oct 2017, 20:35

Which version of the Aimeos package are you using?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Bevi
Posts: 33
Joined: 25 Sep 2017, 20:57

Re: Stock not working

Post by Bevi » 13 Oct 2017, 21:33

aimeos wrote:Which version of the Aimeos package are you using?

Laravel 2017.07.3

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

Re: Stock not working

Post by aimeos » 14 Oct 2017, 09:25

Sorry, the documentation wasn't up to date: It must be "stock.stocklevel" and "stock.type"
It's now correct: https://aimeos.org/docs/Developers/Cont ... _CSV#Stock
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply