• Welcome to KonaKart Community Forum. Please login or sign up.
 
December 22, 2024, 01:20:56 am

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Kim.Zeevaarders

1
No all our classes are generated by JAX-WS based on the complextypes defined in the kkadmin WSDL. So we do not have konakart api's in our project. The only thing we do is fill objects and call webservice methods.

Do you mean that you can talkt to the admin API and that the admin API uses SOAP under water? How can we accomplish this?

In the konakart application you can do this by editing the konakart_app.properties (comment normal engine, uncomment kkwseng) but how do you do this for the kkadmin application?

Any help on this would be very appreciated :)

Regards,

Kim
2
After too much trail and error with SoapUI, I found a way to get some kind of results.

            AdminDataDescriptor dataDesc = new AdminDataDescriptor();
            dataDesc.setLimit(1);
            AdminProductSearch search = new AdminProductSearch();
            search.setCategoryId(-100);
            search.setPromotionId(-100);
            search.setManufacturerId(-100);
            search.setPaymentScheduleId(-1);
            search.setSku(sku);
            search.setSkuRule(0);

Does anyone understand why these 'default' values are not set when saying: AdminProductSearch search = new AdminProductSearch();

Even the limit defaults to 0 and results in zero results. So you should always set this to -1 or some big number to get some sort of results.

Regards,

Kim
3
Hello veryone,

I have an issue using the Admin webservices to retrieve a product based on the SKU. Whatever I try, it seems impossible to get the product.

    public AdminProduct getProductBySku(String sku) throws ServiceException {
        logger.debug("Searching adminproduct by sku: " + sku);

        int languageId = -1;
        try {
            String session = kk_admin.login(loginname, password);
            AdminDataDescriptor dataDesc = new AdminDataDescriptor();
            dataDesc.setLimit(1);
            AdminProductSearch search = new AdminProductSearch();
            search.setWhereToSearch(0);
            search.setCategoryId(-100);
            search.setSearchCategoryTree(true);
            search.setManufacturerId(-100);
            search.setPromotionId(-100);
            search.setProductType(-100);
            search.setSku(sku);
            search.setSkuRule(0);

            AdminProducts results = kk_admin.searchForProducts(session, dataDesc, search, languageId);
            if (results.getProductArray() != null & results.getProductArray().length == 1) {
                return results.getProductArray()[0];
            }
            logger.warn("Adminproduct with sku not found: " + sku);
            return null;
        }
        catch (RemoteException re) {
            throw new ServiceException("Unable to find a product by SKU", re);
        }
    }

Does anyone know how to properly implement this?

Regards,

Kim
4
Trevor,

The order is already sent to the correct unit. The email is the (extra) trigger for the administrative people to process the order from within another system.

Thx for the reaction.

Regards,

Kim
5
Trevor,

We need this because certain types of orders are processed by different business units. Trigger for this processing is the email.

Judging your other reactions we cannot use the predefined addresses because, as you say it, they are global for the engine. This is not going to work for us.

For the moment, it looks like the desired functionality is not possible unfortunatley.

Thx for the help.

Regards,

Kim
6
Trevor,

The addition of an array of email addresses to the email options would be THE solution for our problem. When will this be included? This seems like functionality that  everbody can profit from.

For now:

If I look at the admin app and then the email options I see the field 'Send Extra Emails To'. Is this what you mean by predefined set of email addresses? How many addresses can you define there? For now, we need a solution to send the orderconfirmation email to multiple (<3) recipients. So, I was thinking about dynamically setting the predefined addresses you mentioned. How can I access these predefined addresses via the API?

Thx,

Kim
7
Hi everybody,

We would like to send the orderconfirmatrion email to multiple email adresses. These email addresses are dynamically determined.

Looking through the API I cannot find such a method since almost all of the email methods send the mail to the customer.

Any pointers on how to accomplish this?

Thx in advance,

Kim
8
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
9
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


10
Hi,

I created a custom Struts project and configured it to work with the konakart api's (added the jars, copied the property files, etc.).

So far so good.

I also copied the BaseAction from the kkeclips project in my own project and extended my action classes from this superclass.

But when I try to instantiate a KKAppEng object using BaseAction.getKkAppEng (in my action) I get the following:

java.lang.NullPointerException
   at com.konakart.al.KKAppEng.getEngConfCopy(Unknown Source)
   at com.konakart.al.KKAppEng.getAServerEngineInstance(Unknown Source)
   at com.konakart.al.KKAppEng.init(Unknown Source)
   at com.konakart.al.KKAppEng.<init>(Unknown Source)
   at ou.test.actions.BaseAction.getKKAppEng(BaseAction.java:97)
   at ou.test.actions.OverviewAction.execute(OverviewAction.java:21)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

It seems that the EngineConfig is null. What am I missing here. Do I need to instantiate this object also and then instantiate the KKAppEng with this engconfig as a constructor parameter?

I'd like to know how one must instantiate the Konakart enviroment properly if not using the standard eclips project. Or maybe you guys can point out where to find information about this in the user guide?

TIA!

Regards,

Kim
11
Trevor,

Once again thx for the quick and clear reaction.

Regards,

Kim
12
Hi everybody,

I have difficulties understanding some basic things about the working of the KK engine(s) and the different managers and hope you can help me out here:

- If I override the engine through use of the custimization framework I am overriding the server side engine?
- Is the interface of this engine what you guys call the KK API?
- Is it true that the only extra functionality of the client-side engine (in comparison with the server side engine) is to maintain state per request? So in that aspect it is a sort of statefull wrapper around the server side engine?
- Does the above also account for the client-side (al) and server-side managers (bl) like the productmanager or basketmanager. If not in what aspect do these client-side managers differ from their server side counterparts?
- If I call kkAppeng.getProductManager() I get the al manager, but according to the documentation I can only subclass the bl manager. Is it true that subclassing the bl productmanager has effect on the working of the al productmanager, since it is only a statefull wrapper round the stateless bl productmanager?

TIA!

Regards,

Kim
13
Kate,

Thanks for the response.

So it's actually not a real feature, you guys only wrote an ant script to convert the store front app to comply to the JSR-168 standard.

If U want somethin custom you're on your own :)

I'll dive into Liferay development then...

Regards,

Kim
14
Hi,

I planning on developing a simple Konakart Portlet which will list some links to the details of the "new" products (same as te list on the main page when you log in to the store front). I will get this data through use of the highlevel konakart soap api.

I already created a new project (in eclipse) and copied the following things from the kkeclips project to my testproject:
- the web-inf folder (only the files under this directory, not the subfolders, e.g. web.xml, struts-config.xml, etc.)
- all libraries from the web-inf/lib directory
- alle property files under the src/properties directory.

At this point I think I have all necessary files to use the konakart soap-api in my project (if not, please point out the missing things :)) and build a simple struts/jsp page with a singkle action that call the soap-apis to retrieve the new products from the database and show them as links in the jsp page.

However, to get this program to run succesfully as a portlet I need to comply to the JSR168 specification, which I know very little about...

I already build the portlet_war with ant (target=make_liferay_portlet_war) that is referenced from the user guide and deployed it in liferay. This all works very smooth (except that I do not see any categories in the left upper corner ánd cannot add products to the basket, but this is for later concern).

Further analysis of the build target in the build.xml file shows the following core actions being performed:

      <echo message="Lay out the WAR in the staging area" />
      <echo message="Copy (almost) the whole konakart webapp to staging area" />
      <copy todir="${custom.home}/konakart_portlet/stage/konakart/">
         <fileset dir="${konakart.dir}">
            <exclude name="**/struts.jar" />
            <exclude name="**/*.jsp" />
            <exclude name="**/web.xml" />
            <exclude name="**/struts-config.xml" />
         </fileset>
      </copy>

      <echo message="Copy the jars reqd for the portlet to staging area" />
      <copy todir="${custom.home}/konakart_portlet/stage/konakart/WEB-INF/lib">
         <fileset dir="./konakart_portlet/struts">
            <include name="struts-1.2.7.jar" />
            <include name="portals-bridges.jar" />
         </fileset>
      </copy>

      <echo message="Copy the config files reqd for the portlet to staging area" />
      <copy todir="${custom.home}/konakart_portlet/stage/konakart/WEB-INF/">
         <fileset dir="./konakart_portlet/struts">
            <include name="*.xml" />
            <include name="*.tld" />
         </fileset>
         <fileset dir="./konakart_portlet/liferay">
            <include name="*.xml" />
         </fileset>
      </copy>

      <echo message="Filter the JSPs to staging area for the portlet WAR" />
      <java classname="com.dsdata.util.PortalBuildUtils"
            fork="false"
            failonerror="true"
            timeout="20000">
         <arg value="jsp" />
         <arg value="-p" />
         <arg value="liferay" />
         <arg value="-i" />
         <arg value="${konakart.dir}/" />
         <arg value="-o" />
         <arg value="${custom.home}/konakart_portlet/stage/konakart/" />
         <classpath refid="konakart.portlet.build.utils" />
      </java>

      <echo message="Filter the web.xml to staging area for the portlet WAR" />
      <java classname="com.dsdata.util.PortalBuildUtils"
            fork="false"
            failonerror="true"
            timeout="20000">
         <arg value="webxml" />
         <arg value="-p" />
         <arg value="liferay" />
         <arg value="-i" />
         <arg value="${konakart.dir}/WEB-INF/web.xml" />
         <arg value="-o" />
         <arg value="${custom.home}/konakart_portlet/stage/konakart/WEB-INF/web.xml" />
         <classpath refid="konakart.portlet.build.utils" />
      </java>

      <echo message="Filter the struts-config.xml to staging area for the portlet WAR" />
      <java classname="com.dsdata.util.PortalBuildUtils"
            fork="false"
            failonerror="true"
            timeout="20000">
         <arg value="strutsconfig" />
         <arg value="-p" />
         <arg value="liferay" />
         <arg value="-i" />
         <arg value="${konakart.dir}/WEB-INF/struts-config.xml" />
         <arg value="-o" />
         <arg value="${custom.home}/konakart_portlet/stage/konakart/WEB-INF/struts-config.xml" />
         <classpath refid="konakart.portlet.build.utils" />
      </java>

As I can see a staging directory is created, almost the whole webapps/konakart directory is copied there, jars and .xml files are added to the lib directory and the jsp's and web.xml are filtered/adjusted by something called the portal build uility.

My question is as follows: Do I need to "reverse engineer" this build target for my own custom portlet? What approach do you advise people trying to build their own portlet from scratch? Where can I find more information about the portal build utility and the several added .xml config files that are added?

Furthermore, the user guide is very limited on this subject and only gives a brief explanation about integrating the entire store front in liferay. Nothing is mentioned about the approach when starting from scratch.

I would really appreciate if you guys could get me on my way with this one :)

Many thx in advance,

Kim
15
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