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

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.

Topics - Kim.Zeevaarders

1
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
2
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
3
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
4
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
5
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
6
Hello,

We are going to rebuild the old webshop of a University in the Netherlands with Konakart.

On of the complications is that the products of the University (courses, etc.) are persisted in 2 different legacy databases (Oracle).

Right now we are thinking about the architecture of the solution and are considering two options:

1. The first option is periodically synchronizing these legacy databases with the konakart database usin the xml_io tool or by creating some custom interface using the Konakart API's.
2. Another option is that we only registrate a reference to the products in Konakart (id in products_table), so we can use alle functionality of konakart, but if the content of the product needs to be used we get this data from the legacy database. Our initial thought was to subclass the client-side productmanager and override the relevant methods where necessary.

I saw in the API examples that you can create your own custom product manager and register this new manager in the konakart.properties file. There is only one problem: this concerns the server-side product manager. We need to subclass the client-side product manager because this is returned by the KKAppEng.

My question is therefore as follows:
- Is option 2 a viable one? If not could you please explain where it will go wrong?
- If it is viable, is it possible to subclass the client-side product manager and let the KKAppEng use this? Is it, for example, possible to subclass the KKappEng and let the engine return our custom product manager when the method getKKAppEngine is invoked?

I would like to hear your thoughts about the conceptual idea and, if it's possible, receive some guidelines for doing this.

Many thx in advance,

Kim Zeevaarders