Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Juhis

Pioneers
  • Posts

    6
  • Joined

  • Last visited

Juhis's Achievements

  1. EDIT: There is a problem having two actions in one form. The java code will work for a couple attempts only... Havent found solution to this so I have just removed java part temporarily. The problem is now customer wont get any respond saying he has been removed from the mailing list.
  2. THERE IS ALTERNATIVE SOLUTION: I gave up trying to fix this bug, but I made another very very simple code myself that will do the same thing. By clicking unsubscribe in email customer will be directed to a page that contains an empty form where he shall insert his email address and click "Unsubscribe". After that customer will be directed to page of your choice (in this example UNSUBSCRIBE_COMPLETE.php). For this reason there is java involved. The source code for this page is: 1. Insert inside the end of <HEAD> tags: <script type="text/javascript"> <!-- function doubleSubmit(f) { // submit to action in form f.submit(); // set second action and submit f.target="_blank"; f.action="UNSUBSCRIBE_COMPLETE.php"; f.submit(); return false; } //--> </script> ------------------------------------------------------- 2. Insert this DIV to a page where you direct customer from email unsubscribe link <div> <form method="POST" onsubmit="doubleSubmit(this)" action="<?php tep_db_query("UPDATE customers SET customers_newsletter = '0' WHERE customers_email_address = '" .$_POST['email'] . "'"); ?>"> <table width="250" border="0" cellspacing="2" cellpadding="0"> <tr> <td class="bodytext">Email address:</td> <td><input name="email" type="text" id="email" size="32"></td> </tr> <tr> <td class="bodytext"> </td> <td align="left" valign="top"><input type="submit" name="Submit" value="Unsubscribe"></td> </tr> </table> </form> </div> I hope i have helped someone :)
  3. Hello! Its been a year ago since you asked this but I am having the same problem right now. I have discovered the following, if i change the following line: tep_db_query("UPDATE customers SET customers_newsletter = '0' WHERE customers_email_address = '" .$email_to_news_optout . "'"); TO: tep_db_query("UPDATE customers SET customers_newsletter = '0' WHERE customers_email_address = '[email protected]'"); It will actually work, but of course only for the account registered with that mail address. Anyways, this will verify that the problem is not server side but actually something related to the coding itself (especially functioning of $email_to_news_optout). Someone who knows something about PHP has any suggestions here?
  4. I read others recommends about this guy and decided to try him. Well, I'm glad I did - HE IS FANTASTIC!!! Awesome skills, thanks Satish!

×
×
  • Create New...