KonaKart has a flexible plug-in architecture to support the addition of modules for "payment", "shipping" and "order-totals".
Payment modules shipped with KonaKart are installed and configured through the Administration Application.
If you wish to add a new payment gateway and are not a programmer, please contact us. If you are a Java programmer, it is possible for you to add your own module by following the examples we provide in the package. There is a detailed guide in the Customization FAQ .
The best approach is to learn by example. We supply all of our supported modules in source code format. They can be found under the examples directory. All payment modules should extend com.konakart.bl.modules.payment.BasePaymentModule and implement com.konakart.bl.modules.payment.PaymentInterface.
In order to determine which Payment Modules are installed, the KonaKart engine reads the "MODULE_PAYMENT_INSTALLED" configuration property which should contain a semicolon delimited list of payment modules installed. In the case of a current osCommerce database, the property will contain a list of PHP modules (i.e. cc.php;cod.php). KonaKart ignores the extension. Let's say that you introduce a new module called "MyModule". In this case, KonaKart will look for a class called MyModule.class in the package "com.konakart.bl.modules.payment.mymodule". Note that the package name is always the class name converted to lower case.
The interface that the payment module implements is relatively simple . The main method is called getPaymentDetails(Order order, PaymentInfo info) . The module is passed in the Order object and a PaymentInfo object . The PaymentInfo object contains details on zone information so that the module can be disabled if the delivery address isn't within a zone. It also contains details used mainly for IPN (Instant Payment Notification) such as the host and port details for the return notification and a secret key that can be used to validate the return notification. The order object contains all details about the order, some of which, may be required. In the case of the PayPal example, the final piece of the puzzle is contained in a Struts action class called com.konakart.actions.ipn.PayPalAction. This action is called by PayPal in order to return the status of the payment. When received, the action class may change the state of the order as well as updating the inventory.
Shipping modules shipped with KonaKart are installed and configured through the Administration Application.
If you wish to add a new shipping module and are not a programmer, please contact us. If you are a Java programmer, it is possible for you to add your own module by following the examples we provide in the package. The best approach is to learn by example. We supply a few examples in source code format:
com.konakart.bl.modules.shipping.flat.Flat.java - Flat rate
com.konakart.bl.modules.shipping.item.Item.java - Rate per item
com.konakart.bl.modules.shipping.table.Table.java - Rate based on weight or order amount
com.konakart.bl.modules.shipping.zones.Zones.java - Rate based on weight and zone
In order to determine which Shipping Modules are installed, the KonaKart engine reads the "MODULE_SHIPPING_INSTALLED" configuration property which should contain a semicolon delimited list of shipping modules installed. In the case of a current osCommerce database, the property will contain a list of PHP modules (i.e. flat.php;item.php;table.php). KonaKart ignores the extension. Let's say that you introduce a new module called "MyModule". In this case, KonaKart will look for a class called MyModule.class in the package "com.konakart.bl.modules.shipping.mymodule". Note that the package name is always the class name converted to lower case.
The interface that the shipping module implements is relatively simple . The main method is called getQuote(Order order, ShippingInfo info) . The module is passed in the Order object and a ShippingInfo object . The ShippingInfo object contains details on zone information so that the module can be disabled if the delivery address isn't within a zone. It also contains information about the number of packages and their weight etc so that the shipping cost can be calculated . The order object contains all details about the order, some of which, may be required.
An alternative approach is to contact us with details of the Shipping Module that you would like to integrate with KonaKart so that we can create the module for you.
From version 2.2.3.0, free shipping can be set on a product by product basis. To set free shipping for a product, you must navigate to the Details tab of the Edit Product panel in the Admin App. There you must change the product type to "Physical Product - Free Shipping". In order for this mechanism to function correctly, you must install the Shipping Module called "FreeProduct". This module will return a shipping quote of zero if it detects that the physical products within the order all have free shipping.
Free shipping for all products can be configured in the Administration Application in the section Modules>>Order Totals by selecting the Shipping Module.
You may allow free shipping by setting the Allow Free Shipping value to "true" . In order to not show the shipping cost of zero on the order you must set Display Shipping to "false". Free shipping can be made conditional for orders over a certain amount or just for a combination of national / international orders.
The text that you display on the screen in the area that you would normally select a shipping method, is defined in WEB-INF\classes\com\konakart\bl\modules\shipping\Shipping_xx.properties. This can be set to e.g. "Free shipping for orders over $50", "Free Shipping", "No Shipping" etc.
Note that in order to completely remove shipping from the checkout process, you will need to make modifications to the checkout process (i.e. JSPs, Struts Actions and GWT code in the case of one page checkout).
The Zones Shipping Module allows you implement shipping rates based on the weight of the shipment, for different countries. The module can be installed and configured through the Admin App. The number of different shipping zones has to be decided before running the Admin App. It is set in the properties file:
/webapps/konakartadmin/WEB-INF/classes/com/konakartadmin/modules/shipping/zones/Zones.properties
by editing the section:
# Set this to the number of zones you require. MODULE_SHIPPING_ZONES_NUMBER_OF_ZONES=1
The Admin App uses the above information to create a number of entry fields called "Zone 1 Countries", " Zone 1 Shipping Table", "Zone 1 Handling Fee", "Zone 2 Countries", Zone 2 Shipping Table" etc. depending on how many shipping zones are required.
For each shipping zone you must enter data in :
Zone X Countries
Contains a comma separated list of two character ISO country codes that are part of a shipping zone (i.e. US, CA for USA and Canada)
Zone X Weight Charges
Contains shipping rates to shipping zone destinations based on a group of maximum order weights. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 cost 8.50 for destinations in this Zone. Weights greater than 3 but less than or equal to 7, cost 10.50 for destinations in this zone.
Zone X Handling Fee
Handling Fee for this shipping zone
Order Total modules shipped with KonaKart are installed and configured through the Administration Application.
If you wish to add a new order total module and are not a programmer, please contact us. If you are a Java programmer, it is possible for you to add your own module by following the examples we provide in the package.
The best approach is to learn by example. We supply a few examples in source code format:
com.konakart.bl.modules.ordertotal.shipping.Shipping.java
com.konakart.bl.modules.ordertotal.subtotal.Subtotal.java
com.konakart.bl.modules.ordertotal.tax.Tax.java
com.konakart.bl.modules.ordertotal.total.Total.java
In order to determine which Order Total Modules are installed, the KonaKart engine reads the "MODULE_ORDER_TOTAL_INSTALLED" configuration property which should contain a semicolon delimited list of order total modules installed. In the case of a current osCommerce database, the property will contain a list of PHP modules (i.e. ot_subtotal.php;ot_tax.php;ot_shipping.php). KonaKart ignores the extension. Let's say that you introduce a new module called "MyModule". In this case, KonaKart will look for a class called MyModule.class in the package "com.konakart.bl.modules.ordertotal.mymodule". Note that the package name is always the class name converted to lower case.
The interface that the order total module implements is relatively simple . The main method is called getOrderTotal(Order order, boolean dispPriceWithTax, Locale locale) . The module is passed in the Order object which contains all details about the order, some of which, may be required.
An alternative approach is to contact us with details of the Order Total Module that you would like to integrate with KonaKart so that we can create the module for you.