• Welcome to KonaKart Community Forum. Please login or sign up.
 
December 22, 2024, 11:56:15 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 - ckool

1
I'm sorry, i forgot a line of code in the previous snippet, here is the correct snippet:

KKAdmin eng = new KKAdmin();
sessionId = eng.login(DEFAULT_USERNAME, DEFAULT_PASSWORD);

AdminOrder[] orders = eng.getOrdersCreatedSince(sessionId, yesterday, com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG);
for(int i=0;i<orders.length;i++)
{
  AdminOrder tmpOrder = orders;
  int orderId = tmpOrder.getId();
         
  AdminOrder order = eng.getOrderForOrderId(sessionId, orderId);

  AdminOrderProduct[] products = order.getOrderProducts();
  for(int j=0;j<numProducts;j++)
  {
    AdminOrderProduct orderProduct = products[j];
    AdminOption[] options = orderProduct.getOpts();
    for(int k=0;k<options.length;k++)
    {
      AdminOption option = options[k];
      int optionId = option.getId();
      int valueId = option.getValueId();
    }
  }

}

Thank you very much
2
Hi Kate,

Here is a snippet of code:

KKAdmin eng = new KKAdmin();
sessionId = eng.login(DEFAULT_USERNAME, DEFAULT_PASSWORD);

AdminOrder[] orders = eng.getOrdersCreatedSince(sessionId, yesterday, com.konakartadmin.bl.AdminLanguageMgr.DEFAULT_LANG);
for(int i=0;i<orders.length;i++)
{
  AdminOrder tmpOrder = orders;
  int orderId = tmpOrder.getId();
         
  AdminOrder order = eng.getOrderForOrderId(sessionId, orderId);

  AdminOrderProduct[] products = order.getOrderProducts();
  for(int j=0;j<numProducts;j++)
  {
    AdminOrderProduct orderProduct = products[j];
    AdminOption[] options = orderProduct.getOpts();
    for(int k=0;k<options.length;k++)
    {
      int optionId = option.getId();
      int valueId = option.getValueId();
    }
  }

}

Thank you for your help.
3
I'm trying to get the option id and the the option value id from a Product Order but always get the value 0 (zero) for both attributes using the methods getId() and getValueId() in the object AdminOption.

I've got an Array of AdminOption objects using the the method getOpts() from an object AdminOrderProduct and my Konakart version  2.2.0.0.

Am I doing something wrong? How can I get the correct values for those attributes?

Thank you in advance.
4
Thanks for the quick answer, I didin't know about the Admin API.

I'm trying to do that because a product in my shop has N categories which are not related to the others.
(I.E.
Clothes
  - Dresses
  - Pants
  - ...
Genre
  - Boy
  - Girl
  - ...
Contestant
  - John
  - Mary
  - ...
Trend
  - Dark
  - New Age
  - ....
.....
- ....

In the shop the people can filter by the combinations of any of these filters (and anothers). I.e. I can filter by Genre and trend, by clothes and contestant, by clothes, trend and genre... and so on.

The client API search only allows me to filter for one category so the others must be done it after the search "manually". That was why I was using filterCurrentProdsByCategory (in the wrong way, for what I see). And that was why I need all the categories of a Product.

Thanks again. bye!
5
Hi, it's the first time I'm dealing with the konakart api and I'm experiencing some problems.

I'm trying to get a list of products filtered by price, manufacturer and categories. What I do is:
- Populate the fields of a ProductSearchIf (priceFrom, priceTo, manufacturer and one category).
- Pass the object to a ProductMgr and do the search. (searchForProducts)
- Filter the other categories with filterCurrentProdsByCategory(int categoryId)

The problem is that the search it's ok (returns n results) but the filterCurrentProdsByCategory always return 0 products.

I want also to get all the categories of a product but all i have using the getCategoryId it's the Id of one of the categories not all of them. (I.e. I have the categories "dress", "girl", "Laura", "Dark trend" and I only get "dress").

Hope you can help me. Thanks.