Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

My Account > Sign-up > 'Newsletter' ticked as default


Guest

Recommended Posts

Hi,

 

I'm trying to get the 'newsletter' box in new account signup to have a tick in it by default.

 

Does anyone now how? sure it's something simple!

 

Thanks in advance :thumbsup:

 

Paul

Link to comment
Share on other sites

I have been trying to work that one out too.

 

Someone must know

 

I hope so, I'm not very php minded but learning all the time.

 

I'm sure its quite simple

Link to comment
Share on other sites

I hope so, I'm not very php minded but learning all the time.

 

I'm sure its quite simple

 

 

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

 

The above statement is what you should have for your checkbox query. All you have to do is put the word 'checked' in the ('newsletter', '1', '') parameter like so

 

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

 

Thats it!!!! :thumbsup:

Link to comment
Share on other sites

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

 

The above statement is what you should have for your checkbox query. All you have to do is put the word 'checked' in the ('newsletter', '1', '') parameter like so

 

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

 

Thats it!!!! :thumbsup:

 

Thank you so much! Thats much better!

Link to comment
Share on other sites

It is the create_account.php file in your catalog folder.

 

check your laws before you do this. Many countries require you to opt in, and a prechecked checkbox may not qualify ...

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...