• Resolved nctm

    (@noidcustommobile)


    Total Items Ordered does not show on invoices. This need to show similar to total $ amount on invoice

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! With the Premium Templates extension you can do this by adding a row in the totals with the customizer:

    Without the premium templates you will need to create a custom template and loop through the order items yourself to get the total quantity:

    
    <?php
    $total_qty = 0;
    foreach ($this->order->get_items() as $item_id => $item) {
    	$total_qty += $item->get_quantity();
    }
    echo $total_qty;
    ?>
    
    Thread Starter nctm

    (@noidcustommobile)

    This did not work.

    Plugin Contributor Ewout

    (@pomegranate)

    Where did you place this code? Have you also selected the custom template in the plugin settings?

    Thread Starter nctm

    (@noidcustommobile)

    Theme editor and code snippet. Got an error.

    Plugin Contributor Ewout

    (@pomegranate)

    That explains – this was custom code to include in a custom template:
    Creating a custom PDF template

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Total Items Ordered’ is closed to new replies.