{"id":58659,"date":"2015-12-14T06:25:48","date_gmt":"2015-12-14T11:25:48","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=58659"},"modified":"2017-08-24T05:29:50","modified_gmt":"2017-08-24T09:29:50","slug":"magento-how-to-make-newsletter-subscription-option-checked-by-default","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/magento-how-to-make-newsletter-subscription-option-checked-by-default.html","title":{"rendered":"Magento. How to make newsletter subscription option checked by default"},"content":{"rendered":"<p>\r\n<p>This tutorial will show you how to make newsletter subscription option auto checked on Magento registration Page. <\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=MKIDW4iXw4s?width=1280&amp;height=720\" rel=\"prettyPhoto\">Magento. How to make newsletter subscription option checked by default<\/a><\/p>\r\n<p>Using the file manager such as FileZilla, Total Commander, etc., connect to your server where you&#8217;ve installed your Magento store:<\/p>\r\n<ol>\r\n<li>\r\n<p>Navigate to <strong> \/app\/design\/frontend\/tm_themes\/themeXXX\/template\/persistent\/customer\/form<\/strong> directory.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Open register.phtml file.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Find this line:<\/p>\r\n<pre class=\"brush:php\">&lt;?php if ($this-&gt;isNewsletterEnabled()): ?&gt;<\/pre>\r\n<p>Right below it, add this code:<\/p>\r\n<pre class=\"brush:php\">\r\n\t\t&lt;?php\r\n\t\t$checked = true;\r\n\t\tif($this-&gt;getFormData()-&gt;getEmail()) {\r\n\t\tif(!$this-&gt;getFormData()-&gt;getIsSubscribed()) {\r\n\t\t$checked = true;\r\n\t\t}\r\n\t\t} \r\n\t\t?&gt;\r\n\t<\/pre>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page1-300x73.jpg\" alt=\"magento_newsletter_auto-checked_on_registration_page1\" width=\"300\" height=\"73\" class=\"aligncenter size-medium wp-image-58660\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page1-300x73.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page1-150x37.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page1.jpg 935w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p> Look for the following div:<\/p>\r\n<pre class=\"brush:xml\">&lt;div class=&quot;input-box&quot;&gt;<\/pre>\r\n<\/li>\r\n<li>\r\n<p>Replace:<\/p>\r\n<pre class=\"brush:php\">&lt;?php if($this-&gt;getFormData()-&gt;getIsSubscribed()): ?&gt; checked=&quot;checked&quot;&lt;?php endif; ?&gt;<\/pre>\r\n<p>With :<\/p>\r\n<pre class=\"brush:php\">checked=&quot;checked&quot;<\/pre>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page2-300x112.jpg\" alt=\"magento_newsletter_auto-checked_on_registration_page2\" width=\"300\" height=\"112\" class=\"aligncenter size-medium wp-image-58661\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page2-300x112.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page2-150x56.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page2.jpg 998w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Save this file and upload to the server, replacing the original file. Reload your site to see the changes.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Now we have the &quot;Sign Up for Newsletter&quot; box checked by default:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page3-300x190.jpg\" alt=\"magento_newsletter_auto-checked_on_registration_page3\" width=\"300\" height=\"190\" class=\"aligncenter size-medium wp-image-58662\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page3-300x190.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page3-150x95.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/12\/magento_newsletter_auto-checked_on_registration_page3.jpg 968w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<\/ol>\r\n<p>Thank you for reading this tutorial. Good luck!<\/p>\r\n<div class=\"inline-banner\">\r\n<a href=\"https:\/\/www.templatemonster.com\/service-center\/\">\r\n<img src=\"\/help\/files\/banners\/inline\/Banner-2-(835-x100).jpg\"\/>\r\n<\/a>\r\n<\/div>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=MKIDW4iXw4s?width=1280&amp;height=720\" rel=\"prettyPhoto\">Magento. How to make newsletter subscription option checked by default<\/a><\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to make newsletter subscription option auto checked on Magento registration Page.<\/p>\n","protected":false},"author":12,"featured_media":58665,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[729],"tags":[2133,1323,2407,1100,900],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/58659"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=58659"}],"version-history":[{"count":2,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/58659\/revisions"}],"predecessor-version":[{"id":82936,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/58659\/revisions\/82936"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/58665"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=58659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=58659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=58659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}