I've added a customer custom field (a checkbox) in my checkout registration section. How do I get the value of that checkbox (if its been checked) to be included in my admin order email? I also want to show if the user has checked the 'newsletter' box in the admin email too.
I know I have to edit the following files:
Code: Select all
catalog/controller/mail/order.php
Code: Select all
catalog/view/theme/default/template/mail/order_alert.twig
Code: Select all
if ($order_info['custom_field']) {
$data['consent'] = $order_info['custom_field']['marketing_consent'];
}
Many thanks.