Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cart default to United States and Check newsletter


surfking

Recommended Posts

I am having trouble configuring oscommerce to do the following because I don't know PHP. When a new user is creating an account I want the default pull down address to be the United States. I also want the newsletter box to be pre-checked because hardly anyone signs up for the newsletter. Thanks for your help!

Link to comment
Share on other sites

Unfortunately you can't pre-check the Newsletter sign-up option without modifying a lot of code. If you set the function that does this to 'check' that box then it will check all boxes in use on your site. So, items added to your Shopping Cart will be pre-checked for deletion.

 

For the solution to your other problem look in the Knowledge Base, saw it in there the other day.

 

Vger

Link to comment
Share on other sites

I am having trouble configuring oscommerce to do the following because I don't know PHP.  When a new user is creating an account I want the default pull down address to be the United States.  I also want the newsletter box to be pre-checked because hardly anyone signs up for the newsletter.  Thanks for your help!

 

Check HERE for instructions.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

  • 2 years later...

Hi guys, I came accross this post in hopes to find out how to pre check the newsletter box, and found a really simple solution myself!! So here it is for anyone else that needs it:

 

in catalog/create_account.php find this:

 

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

 

and replace with this:

 

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

 

Note the small difference in the bolded text. All I did was add checked! Hope this helps!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...