Fri. Apr 25th, 2025

7. Magento. How to make newsletter subscription option checked by default

1 min read

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:
    1
    <?php if ($this->isNewsletterEnabled()): ?>

    Right below it, add this code:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    <?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:
    1
    <div class=”input-box”>
  5. Replace:
    1
    <?php if($this->getFormData()->getIsSubscribed()): ?> checked=”checked”<?php endif; ?>

    With :

    1
    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!

April 2025
M T W T F S S
« Jun    
 123456
78910111213
14151617181920
21222324252627
282930