1

PDF Sort Order Totals

Is it possible to change the sort order of the totals in the PDF Print outs?

I would like to have the "Minimum Order Bedrag" under "Subtotaal". I did manage to change it for the checkout page since there is a nice configuration in the backend. However this is not available for te PDF Print outs.

  • first: what is bedrag? second: where in admin do you set sort order for checkout page? – LucScu Jul 24 '17 at 10:36
  • @LucaS bedrag is dutch for amount. And in the Stores -> Configuration -> Sales -> Sales -> Checkout Totals Sort Order you can change the total order – Senta Jul 24 '17 at 11:42
2

Pdf Totals do not have a nice User Interface to change how they are sorted. The sort_order is determined by the etc/pdf.xml files. For example in /vendor/magento/module-sales/etc/pdf.xml you'll find

    <total name="subtotal">
        <title translate="true">Subtotal</title>
        <source_field>subtotal</source_field>
        <font_size>7</font_size>
        <display_zero>true</display_zero>
        <sort_order>100</sort_order>
    </total>
    <total name="discount">
        <title translate="true">Discount</title>
        <source_field>discount_amount</source_field>
        <title_source_field>discount_description</title_source_field>
        <font_size>7</font_size>
        <display_zero>false</display_zero>
        <sort_order>200</sort_order>
    </total>
| improve this answer | |
  • Thank you for pointing me to that file! I will look into it and probably will figure out how it works! – Senta Jul 24 '17 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.