ShopifySharp icon indicating copy to clipboard operation
ShopifySharp copied to clipboard

Wrong LocationId in Order

Open chtoine opened this issue 1 year ago • 5 comments

Hello Guys,

I need to get the location of my articles in a order.

I get the location id with the field LocationId in Order.cs class. But I get wrong (id of the default location) or null id.

I suppose it's a bug Someone can help me ?

TY

chtoine avatar Jul 26 '22 12:07 chtoine

Hey @chtoine, did you get this fixed? I'm not sure what the cause would be, but have you looked at the OriginLocation on each of the order's line items?

nozzlegear avatar Aug 05 '22 21:08 nozzlegear

Hey

Sorry i was on vacation.

I tried this morning with OriginLocation in LineItem but he return the wrong id (default location id again :/)

image When i see my order in the web interface, I see location "AMZ" but with OriginLocation in LineItem.cs or LocationId in Order.cs I get location id off "ENTREPOT" (my default location).

I don't know why.

chtoine avatar Aug 22 '22 09:08 chtoine

I have an other question.

With InventoryLevel class I can get the available stock but i can't get the asigned stock. For example: image I get available stock (5) but how i can get asigned stock (1).

Do you have an idea ?

TY for your help

chtoine avatar Aug 22 '22 13:08 chtoine

Unfortunately the inventory API is something I've never worked with very much, so I'm a little unclear on how it all ties together at the moment. I'll see if I can play around with it soon and get a better grasp on how it works.

nozzlegear avatar Aug 22 '22 21:08 nozzlegear

@chtoine You need to read FulfillmentOrders to get this info.

Quite similar to Fullfillments, but each order line will have the assigned location id. It can even be so flexible that one order line might be fulfilled from different locations. Let's say that the order line has 3 x Product A. 2 x Product A might be assigned to location A, and 1 to location B.

The location id on the order is misleading.

The whole location thing is very complex.

davidkdb avatar Sep 12 '22 06:09 davidkdb