• Resolved nichinu

    (@nichinu)


    Hey,
    There has been time when the order number will be same for multiple orders in sequence..
    This issue however is temporary.
    So once that happens is there a way that I can change the order numbers manually?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @nichinu,

    Please make use of this code snippet to update the order number for the orders that are missing in the sequence.

    Let us know if any concerns or queries regarding the snippet.

    Thread Starter nichinu

    (@nichinu)

    thanks for reply. Two quick questions though:
    1) I have more than 2 orders with same number. So which one will it modify?
    2) I run this via the fuction file in child theme right?

    Plugin Author WebToffee

    (@webtoffee)

    Hi @nichinu,

    1. You can use the order_id to differentiate them. No 2 orders will have the same order IDs.
    2. Yes.

    Thread Starter nichinu

    (@nichinu)

    Hey,
    This has happened again. And instead of 2 order this time there are 250.
    It happened all in the same time frame. My guess is due to some conflict with a cache plugin. I am trying to debug that.
    In the mean time is there a way to edit the sequential number in bulk?

    May be edit the sequential number of orders within a certain order ids range (as all of them happened in the same time frame). We can just add a01,a02 and so on to the repeated sequential number of all the order id’s within the range.

    Please help…

    Plugin Author WebToffee

    (@webtoffee)

    Hi @nichinu,

    You can edit the code snippet and add elseif condition to manually update multiple orders.

    Thread Starter nichinu

    (@nichinu)

    Hey,
    The same issue has happened again. This time 300 orders with the same sequence number. I tried editing the code to bulk update the sequence number but it’s not working.

    Can you have a look at it:
    [In this test code, I am trying to changer order id 130499, 130500, 130501 to 1500a, 1500b, 1500c]

    $sequence_number = ‘1500’;
    $temp= ‘a’;
    function wt_change_seq_number ($sequence_number,$order_id)
    {
    $sequence_number = $sequence_number.$temp;
    update_post_meta($order_id, ‘_order_number’, $sequence_number);
    $temp++;
    return $sequence_number;
    }

    for ($order_id = 130499; $order_id <= 130501; $order_id) {
    add_filter(‘wt_alter_sequence_number’,’wt_change_seq_number’,10,2);
    }`

    Thread Starter nichinu

    (@nichinu)

    I updated the code a bit to add a,b,c …. to a series of order_id’s sequence number but it is adding ‘a’ to all the orders:

    function wt_change_seq_number ($sequence_number,$order_id)
    {
    	$temp= 'a';
        $order_ida = '130499';
    	
    	for ($x = '0'; $x <= '1'; $x++) 
    	{
    		$order_ida = $order_id + $x;
    		if($order_id== $order_ida)
    		{
    			$sequence_number = $sequence_number.$temp;
    			update_post_meta($order_id, '_order_number', $sequence_number);
    			$temp++;
    		}
        return $sequence_number;
    	}
    }
    
      add_filter('wt_alter_sequence_number','wt_change_seq_number',10,2);
    Plugin Author WebToffee

    (@webtoffee)

    Hi @nichinu,

    Thanks for sharing the information. Kindly use this code snippet and check. Let us know how it goes.

    Thread Starter nichinu

    (@nichinu)

    Thanks a lot.. That worked like a charm…
    Also is there a way to disable sequence number for the upcoming orders and keep it for the already assigned one..

    I need to debug this issue and for I might have to disable the plugin for some time. So I need to create a smooth transition for the customers.

    Plugin Author WebToffee

    (@webtoffee)

    Hi @nichinu,

    Thanks for sharing the information. We are glad to know that the issue is resolved.

    Regarding the upcoming orders, presently our plugin doesn’t offer any options to assign order numbers for upcoming orders. Thanks for understanding. If you like the plugin and support, please leave us a review here. Thanks in advance!

    I am having the same issue, and this occurs quite regular. We have very a busy shop with lots of orders every day.
    While I could have come up with the mentioned code snippet updating the order numbers manually, this is actually a bug in the plugin! It should never be possible to have more orders with the same unique number. Our accounting software has big issues with this matter.

    We are a paying for this premium pro version of the plugin and this annoys me a lot.

    Please fix this in the next version. Do something with microtime, or idk, but FIX IT!

    @webtoffee Apart from my above comment, the solution with the code snippet doesn’t solve anything. When a customer places an order he receives the order details per email, with the generated sequential order number.
    If you update/change the order number as mentioned above, the number wil differ from the one the customer already got. So that is clearly not a solution.

    I’m kind of disappointed in the way you handle this bug. Changing the order number will only make things worse!

    Hi @webtoffee, we have the PRO Version for our client, and now we got the same issue. Our client got 3 orders with the same order number? Is this still a bug?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Same order number for multiple orders’ is closed to new replies.