Get category types at product export

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!
nvindice
Posts: 27
Joined: 16 May 2019, 16:20

Get category types at product export

Post by nvindice » 25 Oct 2021, 12:12

Hi Aimeos team,

we declared a category type "main" to store a main category in each product.

When exporting the products to a CSV file, we use the index manager to search for all relevant products, add the "category" domain and are able to use $item->getCatalogItems() to get all categories the product is listed in.

However, we can't find a good way to retrieve the category type (eg. "default", "promotion" or "main").

What is the best way to get this information?

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

Re: Get category types at product export

Post by aimeos » 26 Oct 2021, 05:52

You have to use the catalog/lists manager to get the products associated to the categories including their list type as the list type is not available when using getCatalogItems() of the product.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply