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

How Can I override the searchForProducts method of ProdMgr

Started by sureshbabubv, April 05, 2010, 10:18:47 am

Previous topic - Next topic

sureshbabubv

Dear All,

AdvancedSearchSubmitAction class is  using kkAppEng.getProductMgr().searchForProducts(ps);

I would like to override the  searchForProducts functionality of ProductMgr Class ie instead of konakart search functionality, I have to implement my own functionality with sql queries.

How can I achieve it.

Thanks & Regards,
B.V.Suresh Babu


greg

I'm not 100% sure what you're trying to achieve but you you can customise the engines in various ways.

Check out the User Guide - check out the sections on customizing the engine code.

To give you an idea here you could create your own version of the engine call "searchForProductsWithOptions" that uses your own special search.   

Exactly how you do this would depend on your requirements but using these flexible customization techniques I'm sure you will find ways to achieve your objectives.

sureshbabubv

Hi Greg,

Thanks for your quick reply.


I am writing my own class ArchiProdManager  as shown below.


---------------------------------------

public class ArchiProdManager extends ProductMgr implements ProductMgrIf
{
   
    public ArchiProdManager(KKEngIf eng) throws Exception
       {
           super(eng);
           System.out.println("inside the constructor of ArchiProdManager");
       }

    public void showMessage()
    {
       System.out.println("inside the showMessage of ArchiProdManager");
      
    }
    
   
   
}// end of the class


-----------------------------------------------------

I am configuring this manager as konakart.manager.ProductMgr = com.archiexcel.prod.advsearch.bl.ArchiProdManager in konakart.properites file.


How Can Access the methods of ArchiProdManager in my action classes?



Thanks & Regards,
B.V.Suresh Babu




greg

You can override existing engine calls with the custom managers or you can add new custom API calls...

Check the User Guide - http://www.konakart.com/docs/EngineCustomization.html