KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: sureshbabubv on April 05, 2010, 10:18:47 am

Title: How Can I override the searchForProducts method of ProdMgr
Post by: sureshbabubv on April 05, 2010, 10:18:47 am
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

Title: Re: How Can I override the searchForProducts method of ProdMgr
Post by: greg on April 05, 2010, 10:31:46 am
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.
Title: Re: How Can I override the searchForProducts method of ProdMgr
Post by: sureshbabubv on April 05, 2010, 01:38:40 pm
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



Title: Re: How Can I override the searchForProducts method of ProdMgr
Post by: greg on April 05, 2010, 02:24:44 pm
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