KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: darko.spasovski on September 13, 2011, 08:53:42 am

Title: Get all bundles to which a product belongs
Post by: darko.spasovski on September 13, 2011, 08:53:42 am
Hi all,

I need some help getting all bundles (i.e. bundle products) in which a product belongs to.

From what I saw so far, Konakart provides getRelatedProducts()

http://www.konakart.com/javadoc/server/com/konakart/appif/KKEngIf.html#getRelatedProducts(java.lang.String, com.konakart.appif.DataDescriptorIf, int, int, int) (http://www.konakart.com/javadoc/server/com/konakart/appif/KKEngIf.html#getRelatedProducts(java.lang.String, com.konakart.appif.DataDescriptorIf, int, int, int))

However, it is not clear what will happen if the specified product belongs to several different bundles? How can I make the distinction between which sets of products belong to which bundles?

Is this the right API call, or am I missing something?

Thanks,
Darko
Title: Re: Get all bundles to which a product belongs
Post by: trevor on September 13, 2011, 09:43:59 am
At the moment, through the API you can get a list of products belonging to a bundle. There isn't an API call to get a list of bundles for a product although you could do it with a custom API call with a query on the products_to_products table.
Title: Re: Get all bundles to which a product belongs
Post by: darko.spasovski on September 13, 2011, 10:40:40 am
Quote from: trevor on September 13, 2011, 09:43:59 am
At the moment, through the API you can get a list of products belonging to a bundle. There isn't an API call to get a list of bundles for a product although you could do it with a custom API call with a query on the products_to_products table.


Thanks for your quick reply, I appreciate it.

Can you  point me to some examples of a custom API call doing queries to the KK database?  I am just starting with Konakart and would really make use of some pointers.

Thanks again,
Darko
Title: Re: Get all bundles to which a product belongs
Post by: trevor on September 13, 2011, 10:48:28 am
Take a look at http://www.konakart.com/docs/EngineCustomization.html