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

Overriding the client-side productmanager (External product catalog)

Started by Kim.Zeevaarders, May 26, 2011, 07:36:08 am

Previous topic - Next topic

Kim.Zeevaarders

Trevor,

I modified the engine so far that I can see the product (filled with legacy data) in the main page, add it to the cart (button AddToCart) and see it in the showcartitem page.

To realise this I needed to override 4 engine methods (following from first to last):
- GetProductsPerCategoryWithOptions
- GetProductWithOptions
- UpdateBasketWithStockInfoWithOptions
- CreateOrderWithOptions

It seems that the different managers indeed call these engine methods under water. Now I'm going to try to view the details of the product in the productdetails page and try to complete the order as far as possible (checkout). If this succeeeds i've got a (very limited) proof of concept that it can be done.

From what i've seen it's a trial and error method since there is no clear call hierarchy overview. Luckily I added the println statements in every customengine method so I can exactly see which methods are called over time and especially which methods are called by managers.

Regards,

Kim


Kim.Zeevaarders

Trevor,

The customization of the engine is reasonbly working. I now only have a reference to a product in the kk db (id) and I enrich the product with external retrieved data. So that's exactly what we want :)

The problem I now face is that I want to modify the behaviour of the client-side productmanager.

for example, when the store front is started, in the left pane there is a "random new product" visible.

When you take a look in the jsp (RandomNewProductTile.jsp) it shows that the info for this product comes from the randomNewProp property of the al-productmgr:

<bean:define id="newProd" name="prodMgr" property="randomNewProd" type="com.konakart.appif.ProductIf"/>

The problem is that it shows kk-db values for the product (price=0.0, etc.) So the product in this property is not enriched with external data through my customized engine. I know for sure that I overrode all relevant methods in the engine since I added System.out.println statements to each and everyone of them and then debugged the code when loading the store front (CatalogMainPageAction). So I know exactly what is called when the Mainpage is loaded.

So, following our conversation and the info in the user guide of Konakart, I tried to implement my own bl-Productmanager and overrode all productmethods in this manager. My expectation was that the al-productmanager would delegate calls like getRandomNewProd()  to the bl-productmanager. But the methods of my custom manager are never called!

So my question is as follows:
- How does it come that the al-productmanager doesnt call the bl-productmanager?
- Is there a way to override the al-productmanager or to acces the properties of this manager like the randomNewProd property?

Could you please help me out on this because the go or no-go with Konakart depends on this.

Regards,

Kim



trevor


Kim.Zeevaarders

Trevor,

You're right. I missed this method because it is called when the Konakart store front is intializing/started on the Tomcat server. So I missed this procedure when debugging the code that is invoked when navigating to the main page of Konakart.

Thx for the help. I am glad that it was this because it shows that customizing the engine changes the behaviour of the various managers and it is very important for us to know this works properly.

Thx again!

Regards,

Kim