Support » Plugin: Stock Locations for WooCommerce » Location priority not working for multiple stock locations

  • Hi,

    We are testing the plugin for having orders shipped from multiple stock locations.

    We have 3 stock locations with priority 10,20 and 30 respectively.
    But after placing an order for the product, when we checked the order, the stock was only getting reduced from locations 10 (exhausted) and 30.

    The higher priority value logic is not working in our case, as the stocks always reduce from the Lowest priority as far as we have checked.

    Stock locations – https://prnt.sc/n86kBXUAXBL1

    Order info – https://prnt.sc/cPY9Ma0__jYt

    The Example in our case:-
    We have three locations with priority 10,20 and 30.
    The stock quantity at location 10 -> 7
    The stock quantity at location 20 -> 5
    The stock quantity at location 30 -> 5

    According to your plugin logic, the higher priority location should be selected first, but it is not happening in our case as the location with priority 10 is always getting selected first for stock reduction.

    Can you please help us with this issue?

    Let me know if you any more details from my end.

    Thanks.

    • This topic was modified 1 month, 3 weeks ago by nikhilv.
    • This topic was modified 1 month, 3 weeks ago by nikhilv.
Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter nikhilv

    (@nikhilv)

    Hi,

    Just following up on this issue.

    Any response on this?

    Hey there! We have the SAME ISSUE since months here!

    Hope they can solve this soon!

    smartathome

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Thank you for the follow up, I will update you soon about it.

    Thread Starter nikhilv

    (@nikhilv)

    Hello Farhad,

    Thank you for looking into this. Do you have any updates on this issue?

    Thanks.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    I have just checked the scenario, auto allocation supposed to work when we enable the auto allocation checkbox for the stock locations particularly and if there is any stock location has shortage of stock so this plugin do not allow a user to place order if back-order is not enabled, please confirm till this point, your settings are aligned with my test case?

    Then I added two products in the cart with a location with insufficient stock, on the cart page I changed the qty. for the selected location and proceeded. After checkout, on the edit order page, I tried with a custom number in the location input boxes and updated the order. Stock reduced successfully. So here is my question for you, you are expecting the stock reduction on order received page automatically, right?

    Thread Starter nikhilv

    (@nikhilv)

    Hi,

    Correct the stocks are reduced automatically.

    My issue here is that, the location priority logic is not working properly.

    I have three locations with 5 stock quantities in each location. I have set the priority number to 10, 20 and 30 for each location. I place an order with 8 product quantities.

    According to the plugin logic, the stock should be reduced from priority 30, then priority 20 and then priority 10 right?

    But in my case the stocks are reduced from priority 10 then priority 30. This is not making any sense in my backend logic that I am trying to apply in my custom function.

    Can you please help me with this?

    Thank you.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Thank you for the details, correct me if I am wrong in understanding your issue here, so the product ordered has low stock as qty. 8 with the selected stock location and or it has something in it? Priority works after consuming the available stock of the selected stock location. Kindly synchronize your understanding with me so I can improve this section. This plugin first use the stock available in the selected stock location and then check the priority number.

    Thread Starter nikhilv

    (@nikhilv)

    The stock location is not selected by the user.

    As per my understanding, the location is automatically selected based on the priority that I set correct?

    The product has total 15 stock quantity that is divided into three stock locations (5 quantity in each).

    The test scenario that I gave before was for checking if the automatic location selection works based on priority. Which is why I selected 8 quantities.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Right, auto allocation was actually introduced when one selected location was not fulfilling the ordered qty. so this feature was added to provide the remaining qty. as per priority. Let me test it as you did so user selected nothing then top priority should be considered as the first stock location.

    Thread Starter nikhilv

    (@nikhilv)

    Thanks for checking it. Please let me know once you have tested this scenario.

    • This reply was modified 1 month, 1 week ago by nikhilv.
    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Sure thing, meanwhile please check one more option on your end. There is another option of “Default Location”, which automatically behave like a user selected location and it becomes the first stock location for the stock qty. consumption. Make sure if default location is enabled for any of the locations? And if none of the locations are default then we can force the script to look for the priority instead of default.

    Thread Starter nikhilv

    (@nikhilv)

    In our case, the stock quantities and stock locations are automatically updated through an external API so it is not useful in our case to manually set a default stock location.

    I will check our backend to see if we can set the default location and let you know. But we would like if the priority based selection works automatically.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    I didn’t mean to refer this feature for your requirement usage, I am also in doubt that why script is not considering the higher priority. Just check your settings if there is any stock location with the “default location” checkbox enabled? And if there is any, is that the same which was being considered as priority 10?

    You are right, if there is no “default location” enabled then we can consider only priority number instead of “default location” or “user selected location”.

    Thread Starter nikhilv

    (@nikhilv)

    Currently, there is no default location set on our side. So I considered that the priority-based logic should work.

    Otherwise, as you mentioned, we can force the script to look for the priority instead of default.

    • This reply was modified 1 month, 1 week ago by nikhilv.
    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Perfect, I am proceeding with these settings now.

Viewing 15 replies - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.