Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newsletter default to unsubscribe


Quasi

Recommended Posts

Posted

Hi,

 

The default setting of newsletter is "subscribe" when you create a new account. I want the default to be "unsubscribe", anyone know where thats set cos I cant find it.

 

Cheers,

 

Rob

Does this smell like chloroform to you?

Posted

Well, in newer versions unsubscribed is the default. For older versions, you should be able to change the call to draw the selection box (in the php code) to pick a particular default if you like.

 

Good luck,

Matt

Posted

Im using MS1 and it defaults to "subscribed".

 

And yes, I should be able to change the call to the selection box in the php code, somewhere in account_edit.php or account_edit_process.php I suspect, but I cant find it.

Does this smell like chloroform to you?

Posted

Well, looking at account_edit.php finds that it includes DIR_WS_MODULES . 'account_details.php'. Around line 372 of that file, you should find

    tep_draw_pull_down_menu('newsletter', $newsletter_array, $account['customers_newsletter'])

I'm not sure where it defaults to 1 (subscribed). Perhaps it is as simple as reordering the $newsletter_array definition like this:

  $newsletter_array = array(array('id' => '0',

                                 'text' => ENTRY_NEWSLETTER_NO),

                           array('id' => '1',

                                 'text' => ENTRY_NEWSLETTER_YES));

Good luck,

Matt

Posted

Wow, yes, it was all down to the way the array was ordered in the code.

*realises need to go back and read php manual again*

 

Though the code is actually in catalog/includes/modules/account_details.php - about line 13, in MS1.

 

Thanks for that Matt

Does this smell like chloroform to you?

Archived

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

×
×
  • Create New...