0

I am trying to add user custom field in order receipt pdf using below file commerce_purchase_order under template.

commerce-order-receipt--purchase-order-gateway.html.twig

I tried below code

     {% for order_item in order_entity.getItems %}
       {{ order_item|commerce_entity_render('field_custom_fielname') }}
     {% endfor %}

Also Used but this will not work as this is not field in order

    {{ order_entity.field_custom_fielname }}

Your Answer

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

Browse other questions tagged or ask your own question.