• Welcome to KonaKart Community Forum. Please login or sign up.
 

Multi-Store and SOAP

Started by elisabeth, October 15, 2010, 11:33:25 am

Previous topic - Next topic

elisabeth

Hello

We have a KonaKart deployment and are using the SOAP interface to integrate with our existing infrastructure, but we're having problems with setting up and making use of the multi store feature (single database, mode 2).

So far we have:
- Set up multi store database.
- Configured konakart.properties, konakartadmin.properties.
- Configuring stores in konakartadmin seems to work.

The problems we have now are:

- How can we make KKWSEng connect to different stores?
    - KKWSEng only has a single constructor that takes no arguments.
    - There doesn't seem to be a function to change the current store being used

- How can we set a default store?
    - Currently, new orders are stored with an empty store id
    - We tried implementing getStoreIdFromRequest in BaseAction.java, copying the jars, and switching to KKCustomEng, but it didn't work.

Thank you for your time!

Brian

> KKWSEng only has a single constructor that takes no arguments.

This is not so.   There is  constructor that takes an EngineConfig which is what you should use as this defines the storeId to use.

> How can we set a default store?

You should always define the store in your EngineConfig when your create an engine... hence if you have a default you should define it there.

>  Currently, new orders are stored with an empty store id

That's odd...  it sounds like you're not working in multi-store mode.  Have you made sure that the definitions in konakart.properties and konakartadmin.properties define the correct mode ?   You also have to create your engines using the correct configurations in your EngineConfigs (see above).


elisabeth

About KKWSEng:
I was under the assumption that KKWSEng has no such constructor because it is not listed in the Javadoc: http://www.konakart.com/javadoc/client/com/konakart/app/KKWSEng.html
But if it has that solves the problem.

About multi-store mode:
You were right, it was a configuration problem.

Thanks!

elisabeth

Hello there, followup question.

Here's what we're doing:
1. Call createOrder to create an order object in store1
2. saveOrder in store1
3. saveOrder in store2

Even though the third call completes and the order is stored in the database, konakartadmin isn't displaying orders in the second store (the first store is fine tought). If I look at the database I can see the second order and it looks fine.

First we though this is because createOrder is called on the engine configured for store1, for we re-created a new order object with the engine configured for store2. But this fails: createOrder returns null because apparently the product are not available anymore. This is even though productsShared is enabled in both konakart.properties and konakartadmin.properties.

Any ideas?