• Resolved firepages

    (@firepages)


    Hi Mahmood,

    We have had a problem for some time now, where ‘Auto Allocate’ does not always work, which means that customers end up placing orders for items that have already been sold. We have 3 stock locations – all set to Auto Allocate with priorities 1, 2 & 3. In most cases, stock is correctly allocated, but occasionally, the stock is not allocated and has to be done manually within the order itself in order to correctly update stock level.

    Could this be related to products which are set to allow back orders ?

    Any ideas on how to fix this would be much apprecaited.

    Regards
    Simon Silver

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter firepages

    (@firepages)

    Hi Mahmood,

    I have some debiug info to share with you on this – as you can see, the code seems to skip the first location (8554 – the one with the stock, in favour of checking 8555 where of course there is no stock.

    • allocateLocationStock: 0?<small>(allocateLocationStock / newOrderItemAllocateStock / apply_filters / do_action / do_action)</small>?– 15 Jul, 2024 02:16:42 PM
    • allocateLocationStock: Yes 84?<small>(allocateLocationStock / newOrderItemAllocateStock / apply_filters / do_action / do_action)</small>?– 15 Jul, 2024 02:16:42 PM
    • PASSED #1?<small>(allocateLocationStock / newOrderItemAllocateStock / apply_filters / do_action / do_action)</small>?– 15 Jul, 2024 02:16:42 PM
    • $auto_order_allocate: 1, $allocationType: auto, $term->term_id: 8555, $allocation_proceed: Y = 1?<small>(allocateLocationStock / newOrderItemAllocateStock / apply_filters / do_action / do_action)</small>?– 15 Jul, 2024 02:16:42 PM
    • <small>(allocateLocationStock / newOrderItemAllocateStock / apply_filters / do_action / do_action)</small>?– 15 Jul, 2024 02:16:42 PM
    • Array ( [8555] => 0 )
    • $locationStockMap?<small>(allocateLocationStock / newOrderItemAllocateStock / apply_filters / do_action / do_action)</small>?– 15 Jul, 2024 02:16:42 PM
    • <small>(allocateLocationStock / newOrderItemAllocateStock / apply_filters / do_action / do_action)</small>?– 15 Jul, 2024 02:16:42 PM
    • Array ( [8554] => WP_Term Object ( [term_id] => 8554 [name] => Cabinet [slug] => cabinet [term_group] => 0 [term_taxonomy_id] => 6565 [taxonomy] => location [description] => [parent] => 0 [count] => 6471 [filter] => raw [quantity] => 1 ) [8555] => WP_Term Object ( [term_id] => 8555 [name] => Stock Room [slug] => stockroom [term_group] => 0 [term_taxonomy_id] => 6566 [taxonomy] => location [description] => [parent] => 0 [count] => 6453 [filter] => raw [quantity] => 0 ) [8556] => WP_Term Object ( [term_id] => 8556 [name] => zFarm [slug] => zfarm [term_group] => 0 [term_taxonomy_id] => 6567 [taxonomy] => location [description] => [parent] => 0 [count] => 6165 [filter] => raw [quantity] => 0 ) )
    • $itemStockLocationTerms?<small>(allocateLocationStock / newOrderItemAllocateStock / apply_filters / do_action / do_action)</small>?– 15 Jul, 2024 02:16:42 PM
    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Any further thoughts about the solution? Actually whenever I get any bug report, I try it in my development environment and I see the different results.

    Thread Starter firepages

    (@firepages)

    Hi Mahmood,

    I have a staging site that replicates this problem every time but I’m struggling to see how $locationStockMap gets updated.

    Regards

    Simon

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Simon,

    Your question isn’t clear, $locationStockMap gets updated means? Are you looking into the files? Is it disturbing something, somewhere?

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