Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newsletter Default to Enabled


terencevs

Recommended Posts

Hi

 

When users sign up I want the newsletter option to be automatically ticked. (So that users will automatically be subscribed, they have to choose not to be subscribed)

 

How can I do this?

 

Thanks

Link to comment
Share on other sites

Find this line in account_newsletters.php

 

<td><div align=\"left\"><input type=\"radio\" name=\"list_on_off\" value=\"1\"><font size=\"-2\">" . TEXT_SUBSCRIBE . "</font>   <input type=\"radio\" name=\"list_on_off\" value=\"0\"><font size=\"-2\">" . TEXT_UNSUBSCRIBE . "</font></div></td>

 

Change it to:

 

<td><div align=\"left\"><input type=\"radio\" name=\"list_on_off\" value=\"1\" checked><font size=\"-2\">" . TEXT_SUBSCRIBE . "</font>   <input type=\"radio\" name=\"list_on_off\" value=\"0\"><font size=\"-2\">" . TEXT_UNSUBSCRIBE . "</font></div></td>

 

 

Note just added the word "checked" to it after the value=\"1\"

Link to comment
Share on other sites

  • 2 months later...

I changed create_account.php to include ,checked in this line

<td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1',checked) . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td>

 

Does this look OK? It seems to work.

Link to comment
Share on other sites

  • 2 months later...
Find this line in account_newsletters.php

 

<td><div align=\"left\"><input type=\"radio\" name=\"list_on_off\" value=\"1\"><font size=\"-2\">" . TEXT_SUBSCRIBE . "</font>   <input type=\"radio\" name=\"list_on_off\" value=\"0\"><font size=\"-2\">" . TEXT_UNSUBSCRIBE . "</font></div></td>

 

Change it to:

 

<td><div align=\"left\"><input type=\"radio\" name=\"list_on_off\" value=\"1\" checked><font size=\"-2\">" . TEXT_SUBSCRIBE . "</font>   <input type=\"radio\" name=\"list_on_off\" value=\"0\"><font size=\"-2\">" . TEXT_UNSUBSCRIBE . "</font></div></td>

Note just added the word "checked" to it after the value=\"1\"

 

Can't find this on account_newsletters.php. But Justrimless' suggestion seems to work just fine.

Patty

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...