Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

box newsletter


Guest

Recommended Posts

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:

 

image1.gif

 

It will be necessary to logoff and then login to display correctly:

 

image2.gif

 

can any one help me !

thanks in advance.

Edited by hannibal82_
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...