• Resolved TomCobbley

    (@tomcobbley)


    Hi folks,

    I’ve tried to achieve this myself, but have got to the limits of my coding ability πŸ™

    I’d like to add an additional field (or modify the Order ID field) in my exports, so it looks like this…

    [Order Number]/[SKU]/[Item #]/suffix
    i.e. 133/PP3/1/1/suffix

    Following the examples in the documentation, I’ve tried adding custom php code in the Misc Settings box. I can add the suffix to the Order ID field, but don’t know how to get the SKU or Item #.

    Can someone help me please.

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

    (@algolplus)

    Hi Tom

    What to do if order has more than one item ?

    or will each product have own value in this field?

    thanks, Alex

    Thread Starter TomCobbley

    (@tomcobbley)

    Hi,

    If the order has more than one item, then they would have a new row and the custom fields would be like this for each product (the item# value making each row unique)…

    133/PP3/1/1/suffix
    133/PP3/1/2/suffix

    Thanks

    Plugin Author algol.plus

    (@algolplus)

    hi Tom

    You should add “Item #”(product field) to export and
    add following code in section “Misc Settings”

    add_filter('woe_get_order_product_value_line_id',function ($value, $order, $item, $product,$itemmeta) {
       return $order->get_id()."/".$product->get_sku()."/".$value."/suffix";
    }, 10, 5);

    thanks, Alex

    Thread Starter TomCobbley

    (@tomcobbley)

    Thanks Alex – that’s done the trick πŸ™‚

    Thread Starter TomCobbley

    (@tomcobbley)

    I’ll order the Pro version of your plugin later too!

    Plugin Author algol.plus

    (@algolplus)

    you’re welcome πŸ˜‰

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Modify Order ID field’ is closed to new replies.