Guest Posted January 30, 2008 Share Posted January 30, 2008 (edited) Hi, I installed the contribution addon "box_newsletter" (see url http://addons.oscommerce.com/info/5518 ). I wanted to make a few changes to the code so that a registered user subscribed in the newsletter of the site will only get unsubscribed radio button in infobox newsletter. So I changed the file "catalog / includes / boxes / newsletter.php": [...] <form name="inscription_newsletter" action="inscription_newsletter.php?action=process" method="post"> <center> <table border="0" cellpadding="0" cellspacing="0" class="smallText" > <tr > <td width="100%" height="16" class="smallText">'; if (!tep_session_is_registered('customer_id')) { $in_out_action.= NEWSLETTER_BOX_EMAILADDRESS; $in_out_action.= '<input name="newsletter_email" size="12" /><br /><br />'; $in_out_action .= ' </td> </tr> <tr> <td width="100%" height="1" class="smallText">'; $in_out_action.= '<input name="newsletter_invite" type="radio" value="1" checked="checked" />'; $in_out_action.= NEWSLETTER_BOX_OUI . '<br />'; } else { if ($check_email['total'] > 0) { $in_out_action.= TEXT_INSCRIPTION_NEWSLETTER_EXISTE . '<br />'; $in_out_action.= '<input type="hidden" name="newsletter_email" size="12" value=' . $newsletter['customers_email_address'] .' />'; } else { $in_out_action.= NEWSLETTER_BOX_EMAILADDRESS; $in_out_action.= '<input name="newsletter_email" size="12" value=' . $newsletter['customers_email_address'] .' /><br /><br />'; $in_out_action .= ' </td> </tr> <tr> <td width="100%" height="1" class="smallText">'; $in_out_action.= '<input name="newsletter_invite" type="radio" value="1" checked="checked" />'; $in_out_action.= NEWSLETTER_BOX_OUI . '<br />'; } } $in_out_action.= '<input name="newsletter_invite" type="radio" value="0" />'; $in_out_action.= NEWSLETTER_BOX_NON . '<br /><br />'; $in_out_action.='<input type="submit" value="'; $in_out_action.= NEWSLETTER_BOX_VALIDATION; $in_out_action.='" name="submit" />'; $in_out_action.= NEWSLETTER_BOX_TEXT . ' </td> </tr> </table> </center> </form> [...] The problem is that when a registered user (not guest user) and not subscribed to newsletter and after he subscribe, it shows as follows: It will be necessary to logoff and then login to display correctly: can any one help me ! thanks in advance. Edited January 30, 2008 by hannibal82_ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.