Using customer module to store newsletter subcriptions

Bonus Media

Using customer module to store newsletter subcriptions

Beitragvon Bonus Media » Mi 30. Sep 2009, 19:55

Hi there,
Could anyone tell me if it is possible to make an double opt in form were the information is stored inside the customermodule instead of using a CSV file. In this way I could use more fields for subscribing. I found in the <we:addDelNewsletterEmail> the option type="customer", but found no documentation about it.

I don't want to use this for excisting customers. Just for newsletter subscription.

Thanks in advance for your help

Bonus Media

Senior Member
Beiträge: 562
Registriert: Do 1. Jan 1970, 02:00
Wohnort: Hirschberg

Re: Using customer module to store newsletter subcriptions

Beitragvon haydi » Mo 7. Dez 2009, 09:48

Did you find it out?

I do know that it is possible use information/inputs of the customer module within the newsletter module.
But I don't know if it is possible for the subscription too... sorry.

I made the double opt-in without we-Tags. Stored the entries in an own table. I thought an still think that it is the lightweightest version for me...
Heidi Wetzel
Internet-Applikationen & Webseiten-Erstellung

webEdition Partner
webEdition Partner
Beiträge: 1664
Registriert: Di 7. Mär 2006, 16:50
Wohnort: Wien

Re: Using customer module to store newsletter subcriptions

Beitragvon WBTMagnum » Mi 16. Dez 2009, 00:48

Hi Jorg,

Yes, that's definitely possible. For this case we use the following code, after the data from the subscription form has been validated:

Code: Alles auswählen

<we:addDelNewsletterEmail type="customer" doubleoptin="true" mailid="$newsletterMailID" subject="$newsletterSubject" from="$newsletterSenderMail" id="$confirmPage" />
    <p>A mail has been sent to <we:var type="global" name="WE_NEWSLETTER_EMAIL">! To confirm you subscription, please follow the instructions in this e-mail.</p>
  <we:else />
    <p>Your e-mailaddress <we:var type="global" name="WE_NEWSLETTER_EMAIL"> has been subscribed successfully!</p>
      /* Manually add user to a newsletter group */
      $query = "UPDATE tblWebUser SET Gruppe='".$GLOBALS['newsletterGroup']."' WHERE Username='".$GLOBALS['WE_NEWSLETTER_EMAIL']."'";
      $result = $GLOBALS["DB_WE"]->query($query);
<we:else />      
    <?php $errors['sub_email'] = 'The e-mail ('.$_REQUEST['we_subscribe_email__'].') ist already subscribed!'; ?>
  <we:else />
      <?php $errors['sub_email'] = 'Invalid e-mail ('.$_REQUEST['we_subscribe_email__'].')'; ?>
    <we:else />
      <?php $errors['sub_email'] = 'A problem has occurred while subscribing your e-mail ('.$_REQUEST['we_subscribe_email__'].')! Please contact our support/webmaster/...!'; ?>

Zurück zu „Newsletter Module“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast