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

Facet programming

Started by CyrilTempleux, December 08, 2011, 02:50:56 pm

Previous topic - Next topic

CyrilTempleux

Hello everyone, I searched on this forum but I didn't find an answer to my question : how do you mix tag+manufacturer filtering with price range filtering within the same form ?

I used kkAppEng.getProductMgr().filterCurrentProdsByTags(int tagId) and kkAppEng.getProductMgr().filterCurrentProdsByManufacturer(int manufacturerId) for tag and manufacturer. I managed to use them both in the same form, quite easy. I also managed to use ProductSearch with setPriceFrom and setPriceTo to filter product within a price range. But when I want to use everything at the same time, it doesn't seem to work, the currentProd array resets when I don't want to.

If I put the kkAppEng().searchForProducts(ProductSearch ps) first (with defined price range) then filterCurrentProdsByTags (for exemple), the currentProd array only contains the products with correct tags no matter of price. If I switch them, no matter what tag or manufacturer I choose, it's all about prices regardless of anything else (still the right category though). I don't know what to do to make them everything work.

Thanks in advance

ryan

The Client Engine (kkAppEng) is really helper code which keeps customer state, does some caching, helps with paging etc. and stops the struts action classes and JSPs from becoming too big and complicated. The limitations of the kkAppEng are that it only includes functionality that we use in our demo store-front application.

If your desired application has different requirements, your best bet is to implement them by calling the Application Engine APIs directly. That's the way for example that most people integrate KK functionality into other applications such as CMS systems.

CyrilTempleux

I'm sorry but what you mean by calling the API ? Doing my own product manager ?

ryan

The architecture looks like this http://www.konakart.com/product/technical-details .

The client engine has an instance of the server engine ( kkAppEng.getEng() ). If you do a search for that, you'll see that quite a few of the struts action classes call the engine directly:

custId = kkAppEng.getEng().checkSession(kkAppEng.getSessionId());
PaymentDetailsIf pd = kkAppEng.getEng().getPaymentDetails(kkAppEng.getSessionId(),
CountryIf country = kkAppEng.getEng().getCountry(localForm.getCountryId());

etc.