title: OpenCart + OCMOD - How to get the value from custom_fields?
body: <p>I installed and extension called &quot;Display custom fields for OpenCart 3.0.x&quot; to use custom fields needed for my e-commerce.</p>
  <p>I need to get the value from these custom fields and set them on &quot;catalog/view/theme/default/template/mail/register_alert.twig&quot; with OCMOD so that when a client makes a sign-up to an account, the value of these custom fields get sent to the admin e-mail in the notification e-mail.</p>
  <p>I tried this code:</p>
  <pre><code>    &lt;!-- Recieves and treats the data from the custom fields in 'controller'--&gt;
      &lt;file path=&quot;catalog/controller/mail/register.php&quot;&gt;
          &lt;operation&gt;
              &lt;search&gt;
                  &lt;![CDATA[$data['lastname'] = $args[0]['lastname'];]]&gt;
              &lt;/search&gt;
              &lt;add position=&quot;after&quot;&gt;
                  &lt;![CDATA[
          $this-&gt;load-&gt;model('account/custom_field');
                $custom_fields = $this-&gt;model_account_custom_field-&gt;getCustomFields($args[0]['customer_group_id']);
            
                $data['custom_fields'] = $custom_fields;
              $data['custom_field'] = $this-&gt;request-&gt;post;
                ]]&gt;
                &lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
      &lt;file path=&quot;catalog/view/theme/default/template/mail/register_alert.twig&quot;&gt;
          &lt;!-- Recieves and shows the data from the custom fields in 'view' --&gt;
          &lt;operation&gt;
              &lt;search&gt;&lt;![CDATA[{{ text_telephone }} {{ telephone }}]]&gt;&lt;/search&gt;
              &lt;add position=&quot;after&quot;&gt;&lt;![CDATA[
  {% for cf in custom_fields %}
  {{ cf.name}} : {{ cf_value}}
  {% endfor %}
              ]]&gt;
              &lt;/add&gt;
          &lt;/operation&gt;
      &lt;/file&gt;
  </code></pre>
  <p>But this code only calls to the name of the custom field and doesn't show me the value.</p>
  <p>I'm still learning, can someone help me?</p>