Export, domain "catalog", items?
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Export, domain "catalog", items?
Typo3 - 7.6.16, Aimeos - 16.10.5
Hello. I do the export of goods, and I faced the problem of outputting data with "catalog"
I need the data "id" and "label"
Are there any ready-made items in the store?
Or give a living example of how to create them.
Thank you.
Hello. I do the export of goods, and I faced the problem of outputting data with "catalog"
I need the data "id" and "label"
Are there any ready-made items in the store?
Or give a living example of how to create them.
Thank you.
Re: Export, domain "catalog", items?
You can extend your own class from the product export controller and look up the categories of the products and assign them to the view in addItem():
https://github.com/aimeos/ai-controller ... rd.php#L65
To fetch the category data:
https://github.com/aimeos/ai-controller ... rd.php#L65
To fetch the category data:
Code: Select all
$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'catalog/lists' );
$search = $manager->createSearch( true );
$expr = [
$search->compare( '==', 'catalog.lists.refid', array_keys( $items ) ),
$search->compare( '==', 'catalog.lists.domain', 'product' ),
$search->getConditions(),
];
$search->setConditions( $search->compare( '&&', $expr ) );
$search->setSlice( 0, 0x7fffffff );
$listItems = $manager->searchItems( $search );
$catids = [];
foreach( $listItems as $listItem ) {
$catids[] = $listItem->getParentId();
}
$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'catalog' );
$search = $manager->createSearch( true );
$expr = [
$search->compare( '==', 'catalog.id', $catIds ),
$search->getConditions(),
];
$search->setConditions( $search->compare( '&&', $expr ) );
$search->setSlice( 0, 0x7fffffff );
$catItems = $manager->searchItems( $search );
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