only one job is working who is in the last position

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!
User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

only one job is working who is in the last position

Post by VirtualSpy » 08 Jul 2022, 13:53

Aimeos Version 2021.10.5, PHP Version php-7.4.19-Win32-vc15-x64

i configured the two Cronjobs but only one job is working who is in the second position ....please help me to merge all jobs

'controller' =>
array(
'jobs' =>
array(
'product' =>
array(
'import' =>
array(
'csv' =>
array(
'location' => base_path('storage'),
'skip-lines' => 1,
'mapping' =>
array(
'item' =>
array(
0 => 'product.code',
1 => 'product.label',
2 => 'product.type',
3 => 'product.status',
),

'text' =>
array(
4 => 'text.type',
5 => 'text.content',
6 => 'text.type',
7 => 'text.content',
),

'media' =>
array(
8 => 'media.url',
),

'price' =>
array(
9 => 'price.currencyid',
10 => 'price.quantity',
11 => 'price.value',
12 => 'price.taxrate',
),

'attribute' =>
array(
13 => 'attribute.code',
14 => 'attribute.type',
),

'product' =>
array(
15 => 'product.code',
16 => 'product.lists.type',
),

'property' =>
array(
17 => 'product.property.value',
18 => 'product.property.type',
),

'catalog' =>
array(
19 => 'catalog.code',
20 => 'catalog.lists.type',
),
),
),
),
),
),
),
'controller' =>
array(
'jobs' =>
array(
'catalog' =>
array(
'import' =>
array(
'csv' =>
array(
'location' => base_path('storage/import'),
'skip-lines' => 1,
'mapping' =>
array(
'item' => array(
0 => 'catalog.code',
1 => 'catalog.parent',
2 => 'catalog.label',
3 => 'catalog.status',
),

'text' => array(
4 => 'text.type',
5 => 'text.content',
),

'media' => array(
6 => 'media.url',
),

),
),
),
),
),
),

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

Re: only one job is working who is in the last position

Post by aimeos » 10 Jul 2022, 07:01

You can have only one CSV import configuration in your ./config/shop.php.
One option would be to create own CSV importers extending from the existing one which use different configurations.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

Re: only one job is working who is in the last position

Post by VirtualSpy » 11 Jul 2022, 07:47

thank you so much for your reply ......and please guide me to create own CSV importers

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

Re: only one job is working who is in the last position

Post by aimeos » 12 Jul 2022, 06:09

Here's the documentation for creating own job controllers:
https://aimeos.org/docs/latest/cronjobs ... ontroller/

You can extend your new job controller from the existing product CSV import controller:
https://github.com/aimeos/ai-controller ... andard.php

The important thing is that you use another configuration key for the mapping so you can configure two different mappings:
https://github.com/aimeos/ai-controller ... #L239-L259
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

Re: only one job is working who is in the last position

Post by VirtualSpy » 13 Jul 2022, 14:32

I have created own csv importer for category and product import but i am not getting to understand what should be different in configuration ......please help me for configuration

User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

Re: only one job is working who is in the last position

Post by VirtualSpy » 14 Jul 2022, 06:20

I did this configuration with created own job controller but still facing same problem .....please help me to solve this problem
Attachments
config.png
config.png (219.14 KiB) Viewed 1244 times

User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

Re: only one job is working who is in the last position

Post by VirtualSpy » 14 Jul 2022, 10:50

now my problem has solved .....i merged both configuration in one controller job configuration after making own importers

Post Reply