• Welcome to KonaKart Community Forum. Please login or sign up.
 
April 25, 2024, 10:52:25 am

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

1
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,
                                "meta.description"));
                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.
2
Sorry but I cannot understand your solution: you are simply using

seo.mytitle.title
seo.mydescription.description
seo.mykeywords.keywords

instead of:

seo.default.title
seo.default.meta.description
seo.default.meta.keywords

for ALL the pages isn'it?
3
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
kkAppEng.getOrderMgr().setCouponCode(coupon);


and it seems to work.
4
Hello
   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.
5
I've customized the AddToCartSubmitAction with

if (acf.getEngraving() != null && acf.getEngraving().trim().length() > 0) {
b.setCustom1(acf.getEngraving().trim());
}

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

return mapping.findForward("ShowCart");


but I cannot find the engraving text in the database anyware :-(
6
Programming of KonaKart / Re: Push products
June 22, 2012, 10:42:08 am
Hey anybody there?
7
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
8
Programming of KonaKart / Push products
June 14, 2012, 06:22:25 pm
Hello,
    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?
9
Hello,
   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"
auth="Container"
type="javax.sql.DataSource"
password="password"
url="jdbc:mysql://localhost:3306/konakart?zeroDateTimeBehavior=convertToNull"
username="root"
driverClassName="com.mysql.jdbc.Driver"
/>
<Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access_log." suffix=".log" pattern="common"/>
</Context>

and remove the lines:

#torque.dsfactory.store1.datasource.driverClassName=com.mysql.jdbc.Driver
#torque.dsfactory.store1.datasource.url=jdbc:mysql://localhost:3306/konakart?zeroDateTimeBehavior=convertToNull
#torque.dsfactory.store1.datasource.username=root
#torque.dsfactory.store1.datasource.password=password


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?
10
Hello,
    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.
11
:-(

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.
12
Hello,
   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?
13
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!
14
Sorry let me express a better detailed scenario:

(A)

  • 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)




(B)

  • 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)




(C)

  • 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)




(D)

  • 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
French100€France100€
French100€Italy90€
Italian90€Italy90€
Italian90€France100€


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.
15
No unfortunately isn't this simple   :(