catalog Id in product/export job
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!
catalog Id in product/export job
Good afternoon.
Pls tell me how to get also its categories when exporting a product?
aimeos shop 2022.10, php 8.1. ubuntu 22.04
Pls tell me how to get also its categories when exporting a product?
aimeos shop 2022.10, php 8.1. ubuntu 22.04
Re: catalog Id in product/export job
I see that the data is taken from 4 domains. To the shop catalog.php I also registered the domain 'like this:
I also created a file items-partial-catalog-standard.php and also prescribed the full path to it in the configuration.
in the mshop_product_list table, where, as far as I understand, the product data comes from, there is the necessary line: catalog|default|17
however, after completing the task, I still do not receive this data.
Dear Aimeos team!
I ask for your help.
Code: Select all
'product' => [
'export' => [
'location' => 'my_path',
'type' => 'csv',
'domains' => [
'catalog',
],
'partials' => [
'directory' => '"my_path"/packages/champion-theme/templates/controller/jobs/product/export/items-partial-catalog-standard.php ' ,
],
]
]
in the mshop_product_list table, where, as far as I understand, the product data comes from, there is the necessary line: catalog|default|17
however, after completing the task, I still do not receive this data.
Dear Aimeos team!
I ask for your help.
Last edited by xaxalex on 24 Apr 2023, 15:52, edited 1 time in total.
Re: catalog Id in product/export job
Your configuration is probably at the wrong location. You have to add it either to your ./config/shop.php and use this structure:
Or in your own project-specifc Aimeos extension you've created in ./config/controller.php as:
Code: Select all
'controller' => [
'jobs' =>
'product' => [
'export' => [
'location' => 'my_path',
'type' => 'csv',
'domains' => [
'catalog', 'attribute', 'media', 'price', 'product', 'text'
],
'partials' => [
'directory' => 'my_path/packages/champion-theme/templates/controller/jobs/product/export/items-partial-catalog-standard.php ' ,
],
]
]
]
]
Code: Select all
'jobs' =>
'product' => [
'export' => [
'location' => 'my_path',
'type' => 'csv',
'domains' => [
'catalog' => 'catalog'
],
'partials' => [
'directory' => 'my_path/packages/champion-theme/templates/controller/jobs/product/export/items-partial-catalog-standard.php ' ,
],
]
]
]
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
Re: catalog Id in product/export job
Good afternoon.
My configuration was in ./config/shop.php
I added the example you sent as well in controller.php in its extension.
Anyway, the catalog domain is missing.
it's my controller.php:
partials of product/export/items-body-standard.php
partials of product/export/items-partial-catalog-standard.php
I can't figure out what's the problem
My configuration was in ./config/shop.php
I added the example you sent as well in controller.php in its extension.
Anyway, the catalog domain is missing.
it's my controller.php:
Code: Select all
<?php
return [
'common' => [
],
'frontend' => [
],
'jobs' => [
'product' => [
'export' => [
'location' => 'my_path'/export.zip',
'domains' => [
'catalog', 'attribute', 'media', 'price', 'product', 'text',
],
'partials' => [
'catalog' => ''my_path'/packages/champion-theme/templates/controller/jobs/product/export/items-partial-catalog-standard.php',
],
],
'import' => [
'csv' => [
'location' => ''my_path'/import-product',
],
],
],
'catalog' => [
'import' => [
'csv' => [
'location' => ''my_path'/import-category',
],
],
],
],
];
Code: Select all
<lists>
<?php foreach ($item->getDomains() as $domain): ?>
<?=print('@@@@' . $domain . '!!!!')?>
<?=$this->partial(
'product/export/items-partial-' . str_replace('/', '', $domain) . '-standard',
['listItems' => $item->getListItems($domain)]
)?>
<?php endforeach?>
</lists>
Code: Select all
<catalog>
<?php foreach ($this->listItems as $listItem): ?>
<?=print_r('!!! CATALOG !!!')?>
<?php if ($refItem = $listItem->getRefItem()): ?>
<?=print_r('!!! DOMAIN !!!')?>
<?php endif?>
<?php endforeach?>
</catalog>
Re: catalog Id in product/export job
Seems to be OK. Keep in mind that configuration in ./config/shop.php overwrites configuration if your own extensions.
First I would check if the list of domains really contains "catalog" here:
https://github.com/aimeos/ai-controller ... d.php#L471
First I would check if the list of domains really contains "catalog" here:
https://github.com/aimeos/ai-controller ... d.php#L471
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