• Welcome to KonaKart Community Forum. Please login or sign up.
 
May 05, 2024, 04:24:07 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.

Topics - fjbarrena

1
Hi all,

to use KKAdmin object we need to login in Konakart with an administrator's user/password account, like this:

   Class<?> engineClass =
      Class.forName("com.konakartadmin.bl.KKAdmin");
            
        eng = (KKAdminIf) engineClass.newInstance();
                  
   sessionId = eng.login(AdminConstants.KONAKART_ADMIN_USER,
             AdminConstants.KONAKART_ADMIN_PASSWORD);

I think this is a big security black hole, and my question is

¿it's necessary?
¿there are another way to access to KKAdmin?

Best regards.
2
Programming of KonaKart / AdminCustomerSearch
February 10, 2010, 10:30:33 am
Hi all,

i'm trying to search a customer who have in Customer.Custom3 a value. I'm using a hook before an Order saved.

He're the code:

AdminCustomerSearch searchCriteria = new AdminCustomerSearch();

searchCriteria.setId(KonakartAdminConstants.NOT_SET);
searchCriteria.setPromotionId(KonakartAdminConstants.NOT_SET);
searchCriteria.setEnabled(1);
searchCriteria.setType(KonakartAdminConstants.NOT_SET);
searchCriteria.setNotifiedProductId(KonakartAdminConstants.NOT_SET);
searchCriteria.setGroupId(KonakartAdminConstants.NOT_SET);
               
// searchCriteria.setExpressionName?
               
searchCriteria.setCustom3(customerIdInvitador);
                        
// Get results
AdminCustomerSearchResult customersSearch = eng.getCustomers(sessionId, searchCriteria, 1, 1);
               
// Only get 1 result (or zero)
AdminCustomer customers[] = customersSearch.getCustomers();
               
if (customers.length == 1) {
   // TODO: El destinatario se obtiene del getCustomers con el debido searchCriteria
         
   log.debug(customers[0].getEmailAddr() + " coupon" + couponCode);
}

With this code i don't get any result, but in my konakart database i have a customer who reach the search criteria.

I'm missing something in my code?
I'm wrong in something?

Thanks in advance.

Best regards
3
Programming of KonaKart / Use KKAdminIf in Konakart
February 08, 2010, 11:44:30 am
Hi all,

i'm trying to implement a hook before save order, to check if the user who purchase an item has a coupon.

But when I try to connect with KKAdminIf get the following exception:

08-feb 12:28:09 DEBUG (OrderReceive.java:beforeSaveOrder:50) We're in BeforeSaveOrder
08-feb 12:28:09 WARN  (?:instantiateAdminMultiStoreMgr:?) Admin Multi-Store functionality has not been installed
08-feb 12:28:10 WARN  (?:saveOrder:?) Exception saving an order: Query details:
Criteria::
Current Query SQL (may not be complete or applicable): SELECT  FROM
08-feb 12:28:10 ERROR (?:handleException:?) A customer has received the following exception message:
Exception Name = com.konakart.app.KKException
Exception Message = The session 9893f79fd64851d519ae730fc521fc30 cannot be found
08-feb 12:28:10 ERROR (?:handleException:?) The full exception is:
com.konakart.app.KKException: The session 9893f79fd64851d519ae730fc521fc30 cannot be found
        at com.konakart.bl.SecurityMgr.checkSession(Unknown Source)
        at com.konakart.bl.BaseMgr.getCustomerIdFromSession(Unknown Source)
        at com.konakart.bl.OrderMgr.saveOrder(Unknown Source)
        at com.konakart.app.KKEng.saveOrder(Unknown Source)
        at com.konakart.al.OrderMgr.saveOrder(Unknown Source)
        at com.konakart.actions.CheckoutConfirmationSubmitAction.execute(Unknown Source)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)

And he're is the code:

Quote
   // Inicia1izamos las variables de la API de Konakart
   Class<?> engineClass =
      Class.forName("com.konakartadmin.bl.KKAdmin");
            
        eng = (KKAdminIf) engineClass.newInstance();
          
        sessionId = eng.login(
           "admin@konakart.com",
           "princess");
         
   AdminCustomer kkCustomer =
      eng.getCustomerForId(sessionId, kkCustomerId);



I have konakartadmin.properties, and libraries in the correct place (i think...). konakartadmin.properties are in /konakart/classes and konakartadmin.jar, etc... are in /konakart/lib.

Someone have an idea?

Thanks in advance.

Best regards.
4
Configuration of KonaKart / Promotions
December 30, 2009, 09:20:30 am
Hi all!

We're so confused with promotions. We need to implement a promotion like:

Registered user (John, for example) invites a friend (Sam, for example). Then, Sam accepts the invitation and registers in the shop page.
If Sam buys something for > 50$ (for example), then John gets a coupon with a discount of 10% of 50$.

I think I need to implement this functionality, but I don't know where, the developer documentation doesn't point to this subject, isn't it?.

Some idea?.

Best regards.
5
Configuration of KonaKart / ¿How to use banners?
December 22, 2009, 08:55:09 am
Hi all!

We found a table 'banners' (and 'banners_history') in Konakart's database, but we can't find an administration site for manage banners in konakart.

Anyone has some idea?

6
Hi all !

We're studying konakart's database relationships, and we don't understand the field: products_id (varchar) in KK_WISHLIST_ITEM table.

products_id field (in KK_WISHLIST_ITEM) seems references from TABLE PRODUCTS (primary key).

But products_id in table PRODUCTS has integer type, and products_id in table KK_WISHLIST_ITEM has varchar type.

In other database's tables, type of products_id field is integer, only in KK_WISHLIST_ITEM has varchar type.

¿Is it an error? ¿References to another table, and we don't see it?
If is an error, ¿throws some exception?

Thanks in advance.
7
Configuration of KonaKart / 5th price for a product
November 24, 2009, 10:39:50 am
Hi all !

In our environment we need assign 5 prices to all products, but Konakart only supports 4  :(

Some idea?