Tuesday, 12 May 2015


How to integrate Konakart in liferay


0eab294e4bbc12f94424ecf97fe3b931f39e8b2ae749665369




OverviewSteps on how to integrate KonaKart as portlet in Liferay, shop and administration portlets, having seamless login to administrators. Will be installed in CentOS 5, Liferay 6.0.5 and KonaKart 5.2.0.0.
Alias table
Variable                              Example              Description
${KK_HOST}                       localhost          Host where konakart server will be installed
${KK_DDBB}                      dbname             Database for konakart standard installation
${KK_USERNAME}             user                   Database username for the database in konakart
${KK_PASSWORD}            secret                Database password for the database in konakart
${KK_SRC}                         /KonaKart         Directory for the installation

Steps to followLiferay Installation

   1. Please check the post How to install Liferay because having Liferay properly installed is a precondition.

Java Installation

   1. Download and install java if you still don't have it installed
      yum install java-1.6.0-openjdk.x86_64
      (change the version from which is available for your platform)

KonaKart database creation

   1. Create a database
      create database ${KK_DDBB} character set utf8;

   2. Create a user with ${KK_USERNAME} and ${KK_PASSWORD} if doesn’t exist.
      create user '${KK_USERNAME}'@'localhost' identified by '${KK_PASSWORD}';
   3. Assign permissions for this user:
      grant all on ${KK_DDBB}.* to '${KK_USERNAME}'@'localhost' identified by '${KK_PASSWORD}' with grant option;

KonaKart wizard installation

   1. Download the community edition from http://www.konakart.com/downloads/community_edition.Download both, the installation wizard and the zip containing the sources.Both are required for this integration.

   2. Execute the installation wizard. Follow the steps selecting where the installation will be done and select the database, user and password created in the step below.
      You can use the "silent" version if you don't have a graphical environment.
      Launch at the end the konakart server.

   3. Open http://${KK_HOST}:8780/konakartadmin (or the port that you have choosen), and change the roles to allow administrators login as single sign on. To do that, go to Customers - Maintain roles, select SuperUser and edit, fill field Custom1 with "Administrator" and save.

KonaKart portlet generation

   1. Unzip the zip file downloaded with the source code in the folder ${KK_SRC}.It could be the file KonaKart-5.2.0.0.zip.

   2. Run the next command:
      ${KK_SRC}\custom>bin\kkant -p
      You will see a list of tasks availables.
   
   3. Run the next command to generate the portlet for administration:
      ${KK_SRC}\custom>.\bin\ant make_admin_liferay_portlet_war
   
      If you have some problems deploying this war in liferay, try to make this task with the extra parameter -Djbossliferay=true
      A file called konakartadmin.war will be created in the ${KK_SRC}\custom\admin_portlet_war directory.

   4. Run the next command to generate the portlet for the frontend:
      ${KK_SRC}\custom>.\bin\ant make_liferay_portlet_war
   
      If you have some problems deploying this war in liferay, try again to make this task with the extra parameter -Djbossliferay=trueA file called konakart.war will be created in the ${KK_SRC}\custom\portlet_war directory.

KonaKart deployment

   1. Deploy konakartadmin.war and konakart.war files in liferay.
      If you have some warning messages in the catalina.out file, try to delete the file wsdd included in /WEB-INF/classes/ in the konakart.war file.

   2. Change some parameters defined in the file konakartadmin.properties, konakartadmin_axis.properties and konakart.properties and konakart_axis.properties to the correct values about users, passwords and ports.