There is zero documentation on how to create a variable and attach it to $order or anything of the sort. In my case, I need to multiply a product variables and quantity variable and display them as another variable within the transnational email that gets sent out with a order.

1 Answer 1


the variable that pass to order email template is in the file



you can get all the variable that pass to template here

  • Thank you, however it still doesn't answer my question. How would I add to the $order to show for qty the value based on a product attribute I have added and times it by the qty of the items sold. aka. if cases_per_pallet was the attribute and its 52 and they have 10 qty in the order to times it by 52 and display it in the transactional email. Thanks Commented Jul 23, 2020 at 15:16
  • order item is list out in the file vendor\magento\module-sales\view\frontend\templates\email\items.phtml Commented Jul 24, 2020 at 5:12
  • Gotcha, now where is the area to change the actual value of the field below qty in the email? Commented Jul 30, 2020 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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