• Welcome to KonaKart Community Forum. Please login or sign up.
 

SOAP retrieving products with categories...

Started by avector, July 28, 2015, 05:52:28 am

Previous topic - Next topic

avector

Hello!

On ui we have some kind of filter where it is possible to select some categories, but also we have to display products in columns by categories.

Konakart allows assign multiple categories to one product. So we have products with several categories. We can specify the list of categories (in ProductSearch) to select desired products in "searchForProducts...(..)". But generated client class Product does not contain collection or array of categories which is it related to. It is not good idea to make a SOAP request to know product's categories for each product from the retrieved list of products (from searchForProducts...(..)).

We can make several requests for each selected category, but this doesn't  tell which other categories the product relates to.

For eg the category tree is:
Computer:
- Periphery
- Memory

"Kingston128mb" product relates to "Memory" category and ExtHddX product relates to "Periphery". User selects both Periphery and Memory categories and got "Kingston128mb" and ExtHddX and probably other products. It is needed to display products in columns by categories "Periphery" and "Memory". How to do this if Product doesn't contain any information about related categories?

I have investigate Admin WS but the method "searchForProductsWithOption(..)" always returns empty array of categories in AdminProduct instances. And I didn't find any option in AdminDataDescriptor, AdminProductSearch, AdminProductMgrOptions which is manages populating of categories for products.

So the question is how to search products with related categories?