Author Topic: Mass import of products  (Read 17315 times)

Sphericus

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Mass import of products
« on: July 29, 2007, 09:59:42 AM »
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

  • Administrator
  • Sr. Member
  • *****
  • Posts: 119
    • View Profile
Re: Mass import of products
« Reply #1 on: July 30, 2007, 03:18:37 AM »
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

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Mass import of products
« Reply #2 on: July 30, 2007, 05:03:19 AM »
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

  • Administrator
  • Sr. Member
  • *****
  • Posts: 119
    • View Profile
Re: Mass import of products
« Reply #3 on: July 30, 2007, 05:11:25 AM »
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

  • Administrator
  • Full Member
  • *****
  • Posts: 78
    • View Profile
    • KonaKart
Re: Mass import of products
« Reply #4 on: July 30, 2007, 05:54:01 AM »
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

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Mass import of products
« Reply #5 on: July 30, 2007, 10:56:21 PM »
Thanks for your help.

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

I appreciate your prompt response.

Sphericus

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Mass import of products
« Reply #6 on: August 01, 2007, 05:26:05 AM »
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

  • Administrator
  • Full Member
  • *****
  • Posts: 78
    • View Profile
    • KonaKart
Re: Mass import of products
« Reply #7 on: August 01, 2007, 05:54:15 AM »
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

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Mass import of products
« Reply #8 on: August 01, 2007, 07:08:06 AM »
thanks.

Sphericus

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Mass import of products
« Reply #9 on: August 05, 2007, 07:50:36 PM »
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

  • Administrator
  • Full Member
  • *****
  • Posts: 78
    • View Profile
    • KonaKart
Re: Mass import of products
« Reply #10 on: August 06, 2007, 12:00:31 AM »
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

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Mass import of products
« Reply #11 on: August 06, 2007, 01:50:58 AM »
I assume I cannot run that call remotely?

john

  • Administrator
  • Full Member
  • *****
  • Posts: 78
    • View Profile
    • KonaKart
Re: Mass import of products
« Reply #12 on: August 06, 2007, 02:08:07 AM »
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

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Mass import of products
« Reply #13 on: August 06, 2007, 06:40:43 AM »
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

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Mass import of products
« Reply #14 on: August 12, 2007, 03:44:50 AM »
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.

Code: [Select]
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)