• Welcome to KonaKart Community Forum. Please login or sign up.
December 03, 2023, 09:49:27 pm

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.

Messages - lrkwz

I resolved this issue defining

       private String getCatMessage(HttpServletRequest request, String path,
                        String key) {
                final String localKey = String.format("seo.%s.%s", path, key);
                String localMessage = getCatMessage(request, localKey);
                if (localMessage.contains(localKey)) {
                        log.debug("Resources for " + localKey
                                        + " not found searching seo.default." + key);
                        localMessage = getCatMessage(request, "seo.default." + key);
                log.debug("Resource value is:" + localMessage);
                return localMessage;

        protected KKAppEng getKKAppEng(HttpServletRequest request,HttpServletResponse response, String path) throws KKAppException,
                        KKException {
                KKAppEng kkAppEng = super.getKKAppEng(request, response);

                kkAppEng.setPageTitle(getCatMessage(request, path, "title"));
                kkAppEng.setMetaDescription(getCatMessage(request, path,
                kkAppEng.setMetaKeywords(getCatMessage(request, path, "meta.keywords"));

                return kkAppEng;


where getKKAppEng(HttpServletRequest request,HttpServletResponse response, String path) must be called from the execute method in your actions

        public ActionForward execute(ActionMapping mapping, ActionForm form,
                        HttpServletRequest request, HttpServletResponse response) {

                try {
                        int custId;

                        KKAppEng kkAppEng = this.getKKAppEng(request, response, mapping.getPath().substring(1));

In this way you can define special custom title on a pre-path basis in Message.properties.
Sorry but I cannot understand your solution: you are simply using


instead of:


for ALL the pages isn'it?
Configuration of KonaKart / Re: coupon code not working
November 16, 2012, 03:24:07 pm
Quote from: pete on September 05, 2008, 03:23:55 pm
1. The coupon does have to be rentered during checkout. (...) In some cases, after logging in, the promotion may not even apply to you any more. You could always save the coupon code on the session and use it for checkout if that is what you want.

In my configuration (quite common for my users although) it is quite annoing because you (the user):

  • enter the coupon code

  • press che confirm button

  • login

  • make choices for shipment and payment

  • when the final page just before checkout to the payment gateway is shown you notice (if you careffully look at it) that your coupon based discount is GONE  :(

  • then you must go back to the cart

  • specify the coupon code again and start all over again

I've overridden LoginSubmitAction with

final String coupon = kkAppEng.getOrderMgr().getCouponCode();
String sessionId = kkAppEng.getCustomerMgr().login(lf.getUser(), lf.getPassword()); // this calls refreshCustomerCachedData() which cleanup all customer data including the coupon

and it seems to work.
   I wish to show the total cost for the options the user has bought.
I've derived and ordertotal module but I cannot understand how to distinguish the options the user has really bought.
I've customized the AddToCartSubmitAction with

if (acf.getEngraving() != null && acf.getEngraving().trim().length() > 0) {

kkAppEng.getBasketMgr().addToBasket(b, /* refresh */true);

return mapping.findForward("ShowCart");

but I cannot find the engraving text in the database anyware :-(
Programming of KonaKart / Re: Push products
June 22, 2012, 10:42:08 am
Hey anybody there?
Programming of KonaKart / Seo and struts
June 14, 2012, 06:25:24 pm
Hello I cannot understand how the SEO redirect is handled by struts: which struts action is triggered?

Thank you
Programming of KonaKart / Push products
June 14, 2012, 06:22:25 pm
    which is in your opinion the best way to show specific products in the manufacturer's page?

Should I use tags? and how can I combine the SearchByManufacturerSubmitAction with FilterProductByTagsAction?
   I wish to configure kk so that it uses the jndi connection pool defined in the container.

I've done what described in the docs http://www.konakart.com/docs/DatabaseNotes.html#JNDIDatabaseParameters and the web app start correctly but it I define the jndi pool in the container context:

<Context allowLinking="true">
<Resource name="jdbc/konakartdb"
<Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access_log." suffix=".log" pattern="common"/>

and remove the lines:


the application won't start anymore claiming:

KonaKart V6.0.0.0-C built 9:09PM 24-Jan-2012 GMT

12:41:16.964 [main] DEBUG org.apache.torque.TorqueInstance - init(org.apache.commons.configuration.PropertiesConfiguration@1c75cff)
12:41:16.969 [main] DEBUG org.apache.torque.TorqueInstance - setConfiguration(org.apache.commons.configuration.PropertiesConfiguration@1c75cff)
12:41:16.969 [main] DEBUG org.apache.torque.TorqueInstance - initialize()
12:41:16.970 [main] DEBUG org.apache.torque.TorqueInstance - setConfiguration(org.apache.commons.configuration.SubsetConfiguration@174e78a)
12:41:16.970 [main] DEBUG org.apache.torque.TorqueInstance - initAdapters(org.apache.commons.configuration.SubsetConfiguration@174e78a)
12:41:16.992 [main] DEBUG org.apache.torque.TorqueInstance - Adding mysql -> store1 as Adapter
12:41:16.999 [main] DEBUG org.apache.torque.TorqueInstance - initDataSourceFactories(org.apache.commons.configuration.SubsetConfiguration@174e78a)
12:41:16.999 [main] DEBUG org.apache.torque.TorqueInstance - handle: store1 DataSourceFactory: org.apache.torque.dsfactory.JndiDataSourceFactory
12:41:17.003 [main] DEBUG org.apache.torque.TorqueInstance - getConfiguration() = org.apache.commons.configuration.SubsetConfiguration@174e78a
12:41:17.003 [main] DEBUG o.a.t.d.JndiDataSourceFactory - Starting initJNDI
12:41:17.003 [main] DEBUG o.a.t.d.JndiDataSourceFactory - JNDI path: jdbc/konakart-demo
12:41:17.004 [main] DEBUG o.a.t.d.JndiDataSourceFactory - Time between context lookups: 60000
12:41:17.004 [main] DEBUG o.a.t.d.JndiDataSourceFactory - Set jndi property: java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory
12:41:17.009 [main] DEBUG o.a.t.d.JndiDataSourceFactory - Created new InitialContext
12:41:17.009 [main] DEBUG o.a.t.d.JndiDataSourceFactory - InitialContext -------------------------------
12:41:17.009 [main] DEBUG o.a.t.d.JndiDataSourceFactory - Environment properties:2
12:41:17.009 [main] DEBUG o.a.t.d.JndiDataSourceFactory -     java.naming.factory.initial: org.apache.naming.java.javaURLContextFactory
12:41:17.009 [main] DEBUG o.a.t.d.JndiDataSourceFactory -     java.naming.factory.url.pkgs: org.apache.naming
12:41:17.009 [main] DEBUG o.a.t.d.JndiDataSourceFactory - ----------------------------------------------
12:41:17.009 [main] DEBUG o.a.t.d.JndiDataSourceFactory - Starting initDataSource
12:41:17.010 [main] DEBUG o.a.t.d.JndiDataSourceFactory - Datasource class: org.apache.commons.dbcp.BasicDataSource
12:41:17.089 [main] DEBUG o.a.t.d.JndiDataSourceFactory - InitialContext -------------------------------
12:41:17.090 [main] DEBUG o.a.t.d.JndiDataSourceFactory - Environment properties:2
12:41:17.090 [main] DEBUG o.a.t.d.JndiDataSourceFactory -     java.naming.factory.initial: org.apache.naming.java.javaURLContextFactory
12:41:17.090 [main] DEBUG o.a.t.d.JndiDataSourceFactory -     java.naming.factory.url.pkgs: org.apache.naming
12:41:17.090 [main] DEBUG o.a.t.d.JndiDataSourceFactory - ----------------------------------------------
12:41:17.090 [main] DEBUG o.a.t.d.JndiDataSourceFactory - Added sub context: jdbc
12:41:17.091 [main] DEBUG org.apache.torque.TorqueInstance - Adding the DatasourceFactory and DatabaseAdapter from database store1 onto database default
com.konakart.app.KKException: Unable to connect to the Database called null. Ensure that the database is running
and if so, check the database connection parameters in the konakart.properties file under WEB-INF/classes.

Any suggestions?
    it seems that all orders are stored in the default currency rather than the currency that the user has choosen from the interface. Am I right?
Where can I pick the currency from in order to send it correctly to the payment gateway.

Thank you.

I wish to use a custom price field (i.e. product.setPriceExTax(product.getPrice1()) ) depending on the language choose by the customer.
The u.i. let's the user choose English UK so that British will have English language set + GPB currency
In a custom ProductMgr I would like to setPriceExTag() depending on what user has done in the u.i.
   I'ld like to read the currency chosen by the current user from within a manager's code i.e. com.konakart.bl.CustomProductMgr how can I access it?
Contributions / Re: Italian translation
December 04, 2011, 03:42:46 pm
I've dropped it in github https://github.com/lrkwz/konakart-italian-translation feel free to fork!
Sorry let me express a better detailed scenario:


  • User Bob accesses the site in french

  • Product X has price 100€ in the product page

  • Bob drop X in the shopping cart and check's out:

    • billing:France

    • shipping:France

    • Bob pay 100€ (+tax + shipping)


  • User Bob accesses the site in french

  • Product X has price 100€ in the product page

  • Bob drop X in the shopping cart and check's out:

    • billing:France

    • shipping:Italy

    • Bob pay price 90€ (+tax + shipping)


  • User Bob accesses the site in italian

  • Product X has price 90€ in product page

  • Bob drop X in the shopping cart and check's out:

    • billing:Italy

    • shipping:Italy

    • Bob pay  90€ (+tax +shipping)


  • User Bob accesses the site in italian

  • Product X has price 90€ in product page

  • Bob drop X in the shopping cart and check's out:

    • billing:Italy

    • shipping:France

    • Bob pay 100€ (+tax +shipping)

So billing country doesn't matter. We can summarize in a table

Site languageProduct page priceShipping toFinal price

Do I need the enterprise edition?
Wich configuration do you suggest:

  • One site per country/language

  • One price per site

  • Discount based on shipping country

Thank you.
No unfortunately isn't this simple   :(