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

Programmatically adding a Product to a Bundle.

Started by GrapeApe, November 19, 2008, 07:58:14 pm

Previous topic - Next topic

GrapeApe

Hello KonaKarties,

First off, nice work with KonaKart.  You guys fill a huge, gaping hole in the Java Open Source community (how can we have an open source JVM and almost no open source shopping cart implementations?).  Score another for a community that's "good" at engineering, but blind to practicality.

Anyway, on to my questions:

1)  How do you programmatically add a Product to a Bundle using the admin engine?  I've looked through the sample code, and browsed the Javadocs, but I can't find a way to do this (or I'm just missing it which wouldn't be a huge surprise).

2) Have you considered open sourcing the Admin Application?  There's a lot of great functionality in there and you have to go a good ways down the KonaKart path before you figure out that "woops!  not only is it written in GWT, but the whole thing is closed source!".  Having the sample admin app is nice, but having the source to show how it interacts with your engine would be MUCH better.

Thanks for your help!
Friendly Purple Ape

julie

Quote1)  How do you programmatically add a Product to a Bundle using the admin engine?  I've looked through the sample code, and browsed the Javadocs, but I can't find a way to do this (or I'm just missing it which wouldn't be a huge surprise).


I'm afraid that the Javadoc was missing some information in the 2260 release. Bundled products can be treated like related products so the following methods apply:


  • getRelatedProducts()

  • removeRelatedProducts()

  • addRelatedProducts()



The relationType constants are:

  • KonakartAdminConstants.UP_SELL_RELATION - Up Selling. Normally a superior version of the same product.


  • KonakartAdminConstants.CROSS_SELL_RELATION - Cross Selling. Normally similar or related products.

  • KonakartAdminConstants.ACCESSORY_RELATION - Accessories

  • KonakartAdminConstants.DEPENDENT_ITEM_RELATION - Dependent Item. Normally cannot be sold independently such as a warranty

  • KonakartAdminConstants.BUNDLED_PRODUCTS_RELATION - Bundled product


GrapeApe

Thank you, Julie!  That's exactly what I needed!

Sincerely,
- Big Purple Gorilla