• Resolved jblackburn21

    (@jblackburn21)


    Hi, two questions:

    1. Our exported data has to be in specific order. In Set up fields to export, I have the Products field, and within that, have just 3 fields exporting, SKU, Quantity and Product Current Price. In my export, among all of the other exported fields, I need SKU in position 1, which is fine, but need to have Quantity in position 17 and Product Current Price into position 18. If I could duplicate the Products field, move into position and only select the appropriate fields that would work… or is there another way to deal with this?

    2. On one field, Order Number, I need to make that field unique, so wondering if there is a way to take the content and add something like a dash plus a number and then increment it up. For example, 2378-1, 2378-2, 2378-3.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author algol.plus

    (@algolplus)

    hi

    1. Could you read this topic and use 2nd version of code ?
    We work over this problem and plan to release new version in September.

    2. Could you paste following code to section “Misc Settings”?
    thanks, Alex

    add_filter('woe_fetch_order_row', function ($row,$order_id) {
            static $prev_order = "";
            static $counter = 1;
            //reset for new order 
            if($prev_order != $order_id)  {
                $counter = 1;
                $prev_order  = $order_id;
            }
            if( isset($row['order_number']) )
                 $row['order_number']  .=  "-". $counter++;
    	return   $row; 
    }, 10, 3);
    Thread Starter jblackburn21

    (@jblackburn21)

    Thanks! Worked perfectly…

    Plugin Author algol.plus

    (@algolplus)

    you’re welcome

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Order and incremental number’ is closed to new replies.