0

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.

0

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

vendor\magento\module-sales\Model\Order\Email\Sender\OrderSender.php

https://drops.meetanshi.com/kKe3RY

you can get all the variable that pass to template here

3
  • 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 Jul 23 '20 at 15:16
  • order item is list out in the file vendor\magento\module-sales\view\frontend\templates\email\items.phtml Jul 24 '20 at 5:12
  • Gotcha, now where is the area to change the actual value of the field below qty in the email? Jul 30 '20 at 15:20

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.