only one job is working who is in the last position
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- VirtualSpy
- Advanced
- Posts: 122
- Joined: 05 Jul 2022, 07:55
only one job is working who is in the last position
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',
),
),
),
),
),
),
),
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',
),
),
),
),
),
),
),
Re: only one job is working who is in the last position
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.
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, give us a star
If you like Aimeos, give us a star
- VirtualSpy
- Advanced
- Posts: 122
- Joined: 05 Jul 2022, 07:55
Re: only one job is working who is in the last position
thank you so much for your reply ......and please guide me to create own CSV importers
Re: only one job is working who is in the last position
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
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, give us a star
If you like Aimeos, give us a star
- VirtualSpy
- Advanced
- Posts: 122
- Joined: 05 Jul 2022, 07:55
Re: only one job is working who is in the last position
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
- VirtualSpy
- Advanced
- Posts: 122
- Joined: 05 Jul 2022, 07:55
Re: only one job is working who is in the last position
I did this configuration with created own job controller but still facing same problem .....please help me to solve this problem
- Attachments
-
- config.png (219.14 KiB) Viewed 1244 times
- VirtualSpy
- Advanced
- Posts: 122
- Joined: 05 Jul 2022, 07:55
Re: only one job is working who is in the last position
now my problem has solved .....i merged both configuration in one controller job configuration after making own importers