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

Search Products for multiple manufacturer but not all manufacturers

Started by nitros, April 14, 2008, 05:22:51 am

Previous topic - Next topic

nitros

Hi,

   I have been using konakart for sometime and it is a great product.  I am happy I found the right software for us but as you there is always need for more....:)

My scenario demands a way to search for products belonging to more than one manufacturer but not all manufacturers.  Is there a way in Konakart to display products using wither Quick Search or Advance Search to retrieve products by multiple manufactures?  I have been using quick search functionality but it gives me an option to either search for one manufacturer or all.  I even tried using a loop in the action class but it retrieves and displays only the last manufactuer's products.

Please let me know if there is a way.

pete

Hi, the easiest way (for you) would be for us to add this functionality to the API call, so we'll put it on our TODO list for some future release. We always tend to prioritise customers that have support contracts, so we cannot guarantee any dates.

Meanwhile what you could do, is to use the KonaKart engine API call (not the client engine) in a loop, and save the results on the session so that you can display them using a JSP. Note that this solution isn't ideal since you will have to manage paging, sorting etc. which are tasks normally managed for you by the client engine.

nitros

Pete, just so I understand your solution, I am repeating it here again. 

Your suggestion is instead of calling KKAppEng, call the KKEng.searchForProducts method in a loop and then maintain it in the session in my own class (CustomAppEng).  So, CustomAppEng extends KKAppEng.  I think it is the best workaround, I can think of but how can I instantiate my CustomAppEng instead of KKAppEng.  I see in the struts-config.xml, the KKAppEngPlugin looks at the konakart_app.properties file and instantiates the KKeng but not the KKAppEng.  How do I control the instantiation of my CustomAppEng?

On a related note, I see that the KKAppEng has some getter/setter methods for custom1, customer2...., the javadoc says they can be used for any custom logic but the source for KKAppEng is not available.  Could you please explain how those methods may be used?

pete

Hi,

KKAppEng is instantiated in BaseAction.java so you could instantiate your CustomAppEng there by modifying BaseAction.java. Custom1, 2, 3 etc. are just placeholders to store strings for very simple requirements. They don't really apply to what you want to do.

nitros

Thanks for the help Pete.  Another option I can think of to leverage the use of navigation functionality of the KKAppEng is to overwrite the method getProductMgr(), extend ProductMgr class and then somehow set the products retrieved from the server directly and store it in the currentProducts array. 

I see getCurrentProducts() method but no setCurrentProducts() method, which might make my solution unimplementable.

I will update you if I can do it.  Please comment...

pete

I think that that solution is impossible to implement at the moment. You may as well go ahead and implement your own client engine logic since this will give you the greatest flexibility.