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

Mass import of products

Started by Sphericus, July 29, 2007, 03:59:42 pm

Previous topic - Next topic

Sphericus

Hi.

I had a quick look, and I was not able to find a method of mass importing into the catalog of KonaKart.

The only way I was able to find was to have osc do all the importing and using KonaKart to work off that data.

Some kind of mass import method would be good, as I have data in csv that I would ideally want to refresh into KonaKart on a regular basis.

Any help or advice would be appreciated.

paolo

Hi Sphericus,

A data importing tool is definitely near the top of our new features list and so we should be making it available in one of of our future releases.

Meanwhile, please continue using the osc tool because that is one of the advantages of using KonaKart. (i.e. being database compatible with osc you can use many of the osc contributions).

-Paolo

Sphericus

Thanks for the heads up.

would you happen to know of a way or of an osc contribution that i can run without having to have osc installed? Since many of the osc contributions can be used, but since I am not familiar with osc, I am not sure if the contributions will drop right into KonaKart or will I need to have osc running and working as well.

Since I am running KonaKart against DB2, and to my knowledge osc does not run against anything other than mysql.

So if there was a tool that uses jdbc or simple odbc to connect to the tables it would be great.

As what I had originally planned was to have osc installed and use that to import, then mysqldump, then reimport that back into db2. If that is the most effective way, it will have to do.

paolo

Hi Sphericus,

I didn't realise that you were using DB2 since that will probably rule out contributions such as "Easy Populate" which almost certainly work only with MySQL.

It looks like your import / export idea may have to do for now.

-Paolo

john

Hi,

Just to add another possibility...  when our mass import tool is available it will almost certainly use our Admin APIs.

Since these APIs are available today (via plain java objects or SOAP), you might consider processing your data yourself?   This may not be very appealing if you're not a programmer, but there are a number of examples of using the APIs in the FAQs section of the website if you wish to consider this route.  eg. http://www.konakart.com/apiexamplesfaq.php

{We could also provide a bespoke import utility for your data for a modest charge - if you're interested, please contact us by email at enquiries @ konakart . com.}

Regards,
John

Sphericus

Thanks for your help.

I will have a look over the API's and see how everything goes.

I appreciate your prompt response.

Sphericus

We are currently looking at a few options, and was wondering if there is any reason to not populate the database manually? i.e. import the CSV with some logic into the products* and manufacturer tables with just sql and run of the mill database importation tools.


john

Hi Sphericus,

There's no reason why you can't load the database directly if you know your way around the schema.

Since we will maintain backwards compatibility with the APIs a more future-proof solution would be to use the APIs - in case the tables change etc.. 

Having said that, in future we will have a friendly mass import tool so if your direct SQL loading fails for some reason in the future due to future KonaKart database changes, you should be able to convert it to use the tool without much trouble.

A good example of "safe" data loading via SQL is the Konakart-Home/database/MySQL-4.1/konakart_demo.sql file which is used to prime the database ready for use.   If you copy the way products and manufacturers are installed in that file, you'll be on safe ground...

Good luck,
John

Sphericus


Sphericus

Very quick basic question. Sorry if this is in the FAQ or something, but we couldn't find it.

Basically, how do you authenticate when using the Admin SOAP API's? The wsdl test we did, failed as the server complained about authentication when we sent a push.

Thanks.

john

Hi Sphericus,

You have to use the "login" call of the admin engine interface, which returns a session Id which you use on subsequent calls.

eg:        wsSessionId = engWS.login(USERNAME, PASSWORD);

This is the username and password of the admin user.

Hope that helps,
John

Sphericus

I assume I cannot run that call remotely?

john

Hi Sphericus,

"login" is part of the API so you can call it directly using plain java objects or over SOAP.   Everything in the interface is available either via java or SOAP.   Therefore, if I understand your question correctly, the answer is yes, you can call it remotely.

John

Sphericus

Thanks, I think you understand me correctly. However, I am not yet sure if I understand myself correctly yet ;-). Once the jury comes back on that one I will be sure to let you know :-D

Sphericus

Ran into a slight hurdle today, and not sure of the best method to debug.

When I click on payment info for an order purchased with COD as payment type.
I get the following error. This happens on both items I imported in via SQL as well as an item I manually created with the Admin tool.

Any light you can help shed would be appreciated.


com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -401, SQLSTATE: 42818, SQLERRMC: =
Exception Stack Trace =
at org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:106)
at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:923)
at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:757)
at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:729)
at com.konakartadmin.bl.AdminOrderMgr.searchForIpnHistory(AdminOrderMgr.java:1795)
at com.konakartadmin.bl.KKAdmin.searchForIpnHistory(KKAdmin.java:3206)
at com.konakartadmin.server.KKAdminGWTServiceImpl.searchForIpnHistory(KKAdminGWTServiceImpl.java:3699)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:262)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:803)

Exception Cause =
at com.ibm.db2.jcc.a.rf.e(rf.java:1680)
at com.ibm.db2.jcc.a.rf.a(rf.java:1239)
at com.ibm.db2.jcc.b.jb.h(jb.java:139)
at com.ibm.db2.jcc.b.jb.a(jb.java:43)
at com.ibm.db2.jcc.b.w.a(w.java:30)
at com.ibm.db2.jcc.b.cc.g(cc.java:160)
at com.ibm.db2.jcc.a.rf.n(rf.java:1219)
at com.ibm.db2.jcc.a.rf.a(rf.java:1949)
at com.ibm.db2.jcc.a.rf.a(rf.java:523)
at com.ibm.db2.jcc.a.rf.executeQuery(rf.java:507)
at com.workingdogs.village.QueryDataSet.(QueryDataSet.java:113)
at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:898)
at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:757)
at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:729)
at com.konakartadmin.bl.AdminOrderMgr.searchForIpnHistory(AdminOrderMgr.java:1795)
at com.konakartadmin.bl.KKAdmin.searchForIpnHistory(KKAdmin.java:3206)
at com.konakartadmin.server.KKAdminGWTServiceImpl.searchForIpnHistory(KKAdminGWTServiceImpl.java:3699)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:262)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:803)