If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

Magento. How to make newsletter subscription option checked by default

This tutorial will show you how to make newsletter subscription option auto checked on Magento registration Page.

Magento. How to make newsletter subscription option checked by default

Using the file manager such as FileZilla, Total Commander, etc., connect to your server where you’ve installed your Magento store:

  1. Navigate to /app/design/frontend/tm_themes/themeXXX/template/persistent/customer/form directory.

  2. Open register.phtml file.

  3. Find this line:

    <?php if ($this->isNewsletterEnabled()): ?>

    Right below it, add this code:

    		<?php
    		$checked = true;
    		if($this->getFormData()->getEmail()) {
    		if(!$this->getFormData()->getIsSubscribed()) {
    		$checked = true;
    		}
    		} 
    		?>
    	

    magento_newsletter_auto-checked_on_registration_page1

  4. Look for the following div:

    <div class="input-box">
  5. Replace:

    <?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?>

    With :

    checked="checked"

    magento_newsletter_auto-checked_on_registration_page2

  6. Save this file and upload to the server, replacing the original file. Reload your site to see the changes.

  7. Now we have the "Sign Up for Newsletter" box checked by default:

    magento_newsletter_auto-checked_on_registration_page3

Thank you for reading this tutorial. Good luck!

Feel free to check the detailed video tutorial below:

Magento. How to make newsletter subscription option checked by default

 
Live Chat
We help you to choose the right product.
Start chat