Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Defaults in customer account creation


jimormsbee

Recommended Posts

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

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

Archived

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

×
×
  • Create New...