jimormsbee Posted June 12, 2009 Share Posted June 12, 2009 I would like to be able to set defaults when a customer creates a new account. One item in particular is the 'Newsletter' option, which defaults to false. Customers have to check the box, which I find they seldom do. I first tried to do this in phpMyAdmin with no effect. I then tried to do this in 'create_account.php', but saw no place to set defaults. Any suggestions? Jim Ormsbee Link to comment Share on other sites More sharing options...
rescuestat Posted June 12, 2009 Share Posted June 12, 2009 I would like to be able to set defaults when a customer creates a new account. One item in particular is the 'Newsletter' option, which defaults to false. Customers have to check the box, which I find they seldom do. I first tried to do this in phpMyAdmin with no effect. I then tried to do this in 'create_account.php', but saw no place to set defaults. Any suggestions? Jim Ormsbee Hi Jim, Look in create_account.php around line 482....(may be different if you have added any contribs) Find ... <td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td> Replace with.... <td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1', 'true') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td> You are simply adding the 'true' value to tep_draw_checkbox_field. The checkbox will now be selected by default. Hope that helps. Frank Link to comment Share on other sites More sharing options...
jimormsbee Posted June 12, 2009 Author Share Posted June 12, 2009 Frank, Worked beautifully. I saw the line previously but thought the '1' was 'true'. I now understand. Thanks, Jim Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.