• Resolved luisfrehseribas

    (@luisfrehseribas)


    I’m using the plugin to export a list of orders.

    But some orders have multiple products added.

    I need to have a column detailing all those products and quantities.

    I selected a few product options, but they only report one of the products in the order. I need it to export all the products you have inside the order.

    How do I do this? I need it to export a column containing all products from the order. Order x (Product1 | qty | Product 2 | qty | Product 3 | qty)

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

    (@algolplus)

    hi

    Please, try code add product field “Quantity x Name” from section https://algolplus.com/plugins/code-samples/#add_fields

    thanks, Alex

    Plugin Author algol.plus

    (@algolplus)

    See “how to add code” at top of this page!

    Thread Starter luisfrehseribas

    (@luisfrehseribas)

    Thank You Algol.plus

    I can change this function to show sku of product instead of your name?
    I try to change “name”to sku but don’t work.

    add_filter(‘woe_get_order_value_all_products’,function ($value, $order,$fieldname) {
    $lines = array();
    foreach($order->get_items() as $item) {
    $lines[] = $item[“name”]. ” x ” .$item[“qty”];
    }
    return join(“, “, $lines);
    },10,3);

    It would stay product sku + qty. How i change the name of product to sku product?

    Plugin Author algol.plus

    (@algolplus)

    please, replace
    $lines[] = $item["name"]. " x " .$item["qty"];
    with

    $product   = $order->get_product_from_item( $item );
    $lines[] = $product->get_sku() . " x " .$item["qty"];
    Thread Starter luisfrehseribas

    (@luisfrehseribas)

    Thank you! Your support is incredible.

    Plugin Author algol.plus

    (@algolplus)

    you’re welcome.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Export all products from an order.’ is closed to new replies.