• Resolved firepages

    (@firepages)


    Hi,

    The allocation priorites don’t appear to work in the lastest version (1.6.9). It seems to just use the stock location id, no matter what the priorities are set to.

    Also, the Show location selection in cart setting seems to have to be set to ‘Yes’ for auto allocation, which is the opposite of the instructions on the video.

    Can you please check this ?

Viewing 14 replies - 1 through 14 (of 14 total)
  • I have the same issue here. Auto stock allocation is no longer working on V1.6.9. When I place a test order on our site I get a message on the admin order details page saying:

    ‘Partial or total stock in locations is missing in this order Please fill the remaining stock.’

    Also on the admin order details page it allows me to enter the stock levels to be deducted from each branch – but it also shows ‘Customers Choosed: 2nd Branch’ – however no branch has been chosen on the front end as this has been disabled.

    Many thanks,
    Gordon

    Thread Starter firepages

    (@firepages)

    Hi,

    I beleive that I have managed to fix this by modifying the following lines in helper-slw-stock-allocation.php (public_html/wp-content/plugins/stock-locations-for-woocommerce/src/helpers)

    // Sort
    			uasort($locations, function($a, $b)
    			{
    				$a_priority = isset($a->slw_location_priority) ?: $a->term_id;
    				$b_priority = isset($b->slw_location_priority) ?: $b->term_id;
    				
    				if ($a_priority == $b_priority) {
    					return 0;
    				}
    
    				return ($a_priority < $b_priority) ? -1 : 1;
    			});

    to

    // Sort
    			uasort($locations, function($a, $b)
    			{
    				$a_priority = isset($a->slw_location_priority) ?$a->slw_location_priority: $a->term_id;
    				$b_priority = isset($b->slw_location_priority) ?$b->slw_location_priority: $b->term_id;
    				
    				if ($a_priority == $b_priority) {
    					return 0;
    				}
    
    				return ($a_priority < $b_priority) ? -1 : 1;
    			});

    Thanks! I’ll give this a try.

    I’ve done some more testing and I’ve noticed the following results:

    When I place an order for items where each individual can be sent from a single branch then the order allocation seems to work correctly.

    When I place an order for items where the quantities of each individual item is more than is available at a single branch (but the total can be made up acroess all branches) then order allocation doesn’t work.

    When I place an order for an item that isn’t in stock but is available on backorder then the stock level isn’t reduced to -1, despite having a single branch set as the default for backorder.

    I’ll make the changes that you’ve made to the code and test again.

    Thanks!
    Gordon

    Thread Starter firepages

    (@firepages)

    Hi Gordon,

    Yes – I got the same results, although I didn’t try back orders.

    Regards
    Simon

    Backorders definitely do not get automatically allocated to despite having a single location set as the backorder location. It seems this may be a bug.

    I remember in previous versions (prior to V1.5.3) that the backorder stock would be correctly allocated and deducted from the backorder location but the main stock quantity would not be deducted to a negative value. Since the recent updates though backorders now don’t seem to work at all.

    Regards,
    Gordon

    Plugin Support Coding Champion

    (@codingchamp)

    Dear Gordon and Simon,

    Thank you both of you for guiding me in details about the sections which are not working appropriately. It would be frustrating if I will not reply here. I am not sure how can we make it possible but to fix a few things I need to see the problems in action, sometimes on development environment we cannot reproduce the reported issue. Are you both available on Slack?

    Thanks

    Thread Starter firepages

    (@firepages)

    Hi,

    Yes – no problem.

    Regards
    Simon

    I’m not on slack but am happy to help. The 2 issues I currently have are:

    1. Stock is not being allocated when the item quantity purchased is greater than the quantity available at one single location.

    For instance – if I have 2 available at location one and 1 available at location two (3 in total) and then I purchase 3 of these at checkout stock does not get deducted on the order. The total stock level for the product remains the same and the stock levels need to be deducted manually on the order edit page to reduce stock.

    The expected behaviour is that stock should be allocated and deducted across both locations by location priority.

    2. Stock levels for items which are on backorder are not being deducted from the backorder location or the total quantity available. There is also no option to manually allocate stock to a location on the order edit page.

    The expected behaviour is that the stock should be deducted at the selected backorder location. It should show as a minus stock level at that location and the total quantity available should also go to a minus stock level.

    The stock priority allocation issue now seems to have been fixed in V1.7.0 with the changes that @firepages provided above but both of the issues I’ve described are still present in V1.7.0. I’m happy to provide a video of the issues or show you them on Zoom or whatever suits you best.

    Many thanks,
    Gordon

    Plugin Support richiewatson

    (@richiewatson)

    @gferguson78 you can check the help section in the plugin for further assistance.

    I am signed up for Slack now if you wish to discuss this there. I have also setup a whole new empty WooCommerce store install with just the Stock Locations plugin setup and am having the same issues as described above with V1.7.1. I’m happy to show you the issues I’m having through Slack or whatever channel suits you best. I have also done some screengrab videos showing the allocation issues.

    Thanks,
    Gordon

    Plugin Support Coding Champion

    (@codingchamp)

    @gferguson78 thank you for the response, I am working on another feature of this plugin. After finishing these todo’s, I will be with you. Once again thank you for coming up for detailed testing with me.

    Thread Starter firepages

    (@firepages)

    Hi,

    Is there any update on this please ?

    We are also seeing problems with refunds – stock is not updated when the option to put items back into stock is ticked.

    Thanks
    Simon

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Dear Simon,

    I am available to check this issue with you. Please join me on slack or reach through help tab. Thank you.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @firepages on the settings page there is an option for urgent help. You may continue testing this issue with me.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Allocation Proirites Not Working’ is closed to new replies.