title: Add newsletter subscribe check option in order Thank you page Magento
body: <p>I want to add option for customer to can subscribe to newsletter in the checkout Thank you page. </p>
  
  <p>How I can remove the Submit button, and have there only a checkbox?</p>
  
  <p>Thank you</p>
  
  <p>Right now in my success page I add this code:</p>
  
  <pre><code>   &lt;div class="order-newsletter"&gt;
          &lt;?php echo $this-&gt;getLayout()-&gt;createBlock('newsletter/subscribe')-&gt;setTemplate('newsletter/subscribe.phtml')-&gt;toHtml(); ?&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/NvpHe.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NvpHe.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Update:</strong></p>
  
  <p>I found this code but in checkout success page I have this error:</p>
  
  <p><strong><em>Fatal error: Call to a member function getEmail() on a non-object</em></strong></p>
  
  <pre><code>&lt;?php
  $checked = true;
  if($this-&gt;getFormData()-&gt;getEmail()) {
      if(!$this-&gt;getFormData()-&gt;getIsSubscribed()) {
          $checked = false;
      }
  }   
   ?&gt;
  &lt;li class="control"&gt;
  &lt;div class="input-box"&gt;
      &lt;input type="checkbox" name="is_subscribed" title="&lt;?php echo $this-&gt;__('Sign Up for Newsletter') ?&gt;" value="1" id="is_subscribed"&lt;?php if($checked): ?&gt; checked="checked"&lt;?php endif; ?&gt; class="checkbox" /&gt;
  &lt;/div&gt;
  &lt;label for="is_subscribed"&gt;&lt;?php echo $this-&gt;__('Sign Up for Newsletter') ?&gt;&lt;/label&gt;
  &lt;?php /* Extensions placeholder */ ?&gt;
  &lt;?php echo $this-&gt;getChildHtml('customer.form.register.newsletter')?&gt;
  &lt;/li&gt;
  </code></pre>