Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to turn on the 'Newsletter' option when create_account.php is loaded?


count1to3

Recommended Posts

Posted

Hi!

 

I got a question about how to turn on the 'Newsletter' option when create_account.php is loaded?

 

Thanks in advanced.

  • 1 month later...
Posted

Find this in admin/includes/modules/newletters/html_output.php

 

// Output a form radio field

function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') {

return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters);

}

You can kill the King, but you can't kill the King Riddim...

Posted

Find this in admin/includes/modules/newletters/html_output.php

 

// Output a form radio field

function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') {

return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters);

}

 

CHANGE TO

 

// Output a form radio field

function tep_draw_radio_field($name, $value = '', $checked = true, $parameters = '') {

return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters);

}

You can kill the King, but you can't kill the King Riddim...

Posted

I needed to have customers subscribed to newslatetrs by default, so i set customers_newsletter in customers table in the db to default to 1 and not null. Then i commented out /catalog/create_account.php lines 479-496 the code that asks customers to sign up for the newsletter, finally I changed /catalog/create_account.php line 52 $newsletter = true;

 

49 if (isset($HTTP_POST_VARS['newsletter'])) {

50 $newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']);

51 } else {

52 $newsletter = true;

53 }

 

So now customers receive newsletters by default, and have to visit the subscribe/unsubscribe page to unsubscribe.

 

I couldn't find the code FOD suggested, but hopefully this might help.

 

Jim

Archived

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

×
×
  • Create New...