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

1
Hello,

I am using the Admin API to retrieve Orders using the getOrders method, all this using C# and ASP.NET, and referencing the Admin WSDL as a service reference.

The problem I am encountering is that the AdminOrders objects retrieved LACK certain critical pieces of information, such as their line items (the orderProducts property is shown to hold zero elements). What I am resorting to is using the array of AdminOrder objects retrieved by getOrders to get their Id's, and then retrieving the full order information using getOrderByOrderId.

However, I have encountered issues even using this approach, as line items retrieved are missing critical pieces of information (such as prices) themselves! At this point I would have to start retrieving AdminProducts individually as well!

Can I get some help figuring this out please?
2
Yet another problem cropped up after finally getting the getOrders filters to work. Even though the documentation doesn't suggest it (that I can find), the orders retrieved by this method are all missing key information, such as not including their line items.

What we are now resorting to doing is using the array of AdminOrder objects retrieved by getOrders to get their Id's, and are then retrieving the full order using getOrderByOrderId. Tedious, but I just don't have it in me to dig into this anymore.

If any KonaKart forum member can shed some light into why this might be happening, I'd love to hear a solution, or at least be pointed to the documentation that states that getOrders is not meant to retrieve critical order information such as line items.

Once again, I hope this saves someone a headache.
3
I admit I have trouble understanding exactly what goes into using the architecture as described above by Ming in .NET and C#, however I have discovered why my order filtering was not working as expected.

As stated above, any getOrders call was failing to retrieve orders when I passed a AdminOrderSearch object. The problem is that its integer properties are always instantiated as being equal to Zero, which is actually a valid search value. They have to be manually set to a NEGATIVE VALUE in order for the search to ignore them. Thus, the object declaration has to be:

AdminOrderSearch search = new AdminOrderSearch
            {
                affiliateIdRule = -1,
                creatorRule = -1,
                custom1Rule = -1,
                custom2Rule = -1,
                custom3Rule = -1,
                custom4Rule = -1,
                custom5Rule = -1,
                customerCityRule = -1,
                customerEmailRule = -1,
                customerId = -1,
                customerPostcodeRule = -1,
                orderId = -1,
                orderNumberRule = -1,
                orderStatusId = -1,
                parentId = -1
            };


This guarantees that any other property you set will filter orders as expected. As for the properties above, they can (after or during the declaration) be set to any value you wish as well. :)

Hope this saves someone some time and frustration!
4
Due to shifting priorities I haven't been working on this problem for the past couple of weeks, but have gotten back into it. I'm not sure I understand what you mean by

Quoteinstead instantiate KKWSAdmin by providing an AdminEngineConfig object in the constructor.


I have the KKWSAdmin WSDL referenced (ex: abc.com/konakartadmin/services/KKWSAdmin?wsdl ) and instantiate KKWSAdminIfService it in order to use its methods.

I can, similarly, instantiate an AdminEngineConfig object, but I don't understand what constructor I'm supposed to be passing it to.

Could you possible expand on your explanation, or post an example? Is there an additional WSDL I should be referencing? Thank you.
5
Thank you for your reply.

I have looked at your test code, and find it to be almost identical to mine. I'm really at my wits end here. Here's a little more detail on what's happening:

First off, all my declarations seem to be in order:


// Declaring the Service, and various objects needed
KKWSAdminIfService adminService = new KKWSAdminIfService();

AdminOrderSearchResult kkOrderSearchResult = new AdminOrderSearchResult();

AdminOrderSearch kkOrderSearch  = new AdminOrderSearch();


Then, I run the search (there are 3 orders in the test store which should be retrieved):


// Filter behavior
kkOrderSearchResult = adminService.getOrders(strSessionId, kkOrderSearch, 0, 5, -1);


This query returns absolutely nothing. The kkOrderSearchResult.orders array is empty, and the kkOrderSearchResult.totalSetSize property is zero. However, if I run the same query but pass no filters:


// No filter behavior
kkOrderSearchResult = adminService.getOrders(strSessionId, null, 0, 5, -1);


All 3 orders are successfully returned. kkOrderSearchResult.orders contains 3 orders, kkOrderSearchResult.totalSetSize equals 3.

Is it possible that there's something wrong with my KonaKart installation? Is there a setting within the store that could be affecting my search? This issue has already taken up a lot of my time, and I have absolutely no idea how to deal with it short of downloading every order in the store and filtering in memory, order by order (which I'm really hoping not to have to do).

Any advice would be greatly appreciated.
6
Hello,

I am trying to download orders through the KKAdmin API, using the getOrders method. When I set the AdminOrderSearch parameter to null, all orders are retrieved (as expected). My other search parameters are: offset set to zero to start, size at 50, and the language id is set to the store default, which I retrieve at run time.

However, I wish to filter the orders retrieved by various criteria such as Create Date, Create Date Range, OrderNumber, and OrderId. When I set, for example, the OrderId property to target a particular order, nothing is retrieved. The same happens when attempting to filter by dateAddedFrom, dateAddedTo, or any other criteria (that I have tried). It was my understanding that any properties of the AdminOrderSearch object that I do not set are simply ignored by the search (as per http://www.konakart.com/javadoc/admin/com/konakartadmin/app/AdminOrderSearch.html), however something clearly isn't working.

I have played around with it for a few hours, but to no avail. Can anyone give me an idea as to why this isn't working? Are there any compulsory AdminOrderSearch properties that must be set in order for the search to go through?

Thanks in advance!
7
Thank you for your swift reply. I'm not very familiar with Kona Kart (at all), and your answer helped clarify a few things for me. I'll be dropping this pursuit for now, as I have other features I have to build as well. If I end up implementing it, however, I will post how I managed to get it done.
8
Hello,

I'm writing a web service that will download Orders from Kona Kart web stores based on different filtering criteria. The standard ones to use are Create Date, Create Date Range, Order Status, Order Id, Last Modified Date, and Last Modified Date Range. It's these last two that are giving me trouble. When integrating with the KKEng API, it seems that the only way to retrieve orders by certain criteria is by using the searchForOrdersPerCustomer function, which is passed two objects for filtering purposes:



The first, DataDescriptor, seems to define how the information retrieved will be sorted/retrieved/paged, and to have nothing to do with filtering the Orders.

The second, however, clearly has properties that filter Orders by the date they were created: dateAddedFrom, dateAddedTo, as well as status.

My question is: Am I missing something? Is there a way to filter by Date Last Modified? Please let me know if it's possible, or if not, what a strategy for doing so in memory might be, without having to download every order in the store.


Thanks in advance!