Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newsletter selected by default


tec

Recommended Posts

hi there everyone, happy saturday :)

 

A client of mine would like to have the newsletter box checked by default when creating an account, how would i go about doing this?

I tried to check out the newsletter table in the DB, but it does not allow you to edit, browse, or anything actually.

Link to comment
Share on other sites

Happy Saturday :)

 

In create_account.php , around line 482 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>

 

change it to

 

<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>

 

That will make it checked by default.

Link to comment
Share on other sites

hey there, thanks for the input, something is going on though, everytime i edit the file and reupload, it gos blank. No matter what i do to it.

Even if i just type the letter, like 's' for example, in one of the <td>'s the page comes up blank. I tried to edit the newsletter code, same thing, i tried moving the postal code info so it was under country, same thing.

 

I tried editing it in dreamweaver and notepad, but no matter what i do, when i try to upload, and refresh the page, it comes up blank :huh:

Link to comment
Share on other sites

hiya there, I have been working on this site for awhile now, it just kind of happened out of nowhere, but I just tried it again and it seems to work ok now.

 

I am not quite sure what the problem was, as I did not change my method when i did the last upload.

 

Thank you again for your help on the newsletter, it is working now

 

now tackle the postal code :C)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...