1

I have issue with newsletter subscription on customer registration process. even i have select "Sign Up for Newsletter" checkbox on registration form.

I got user confirm email but didn't get confirm massage on newsletter as well as newsletter subscription not successful. And not even mention i have subscribe to newsletter. But After I login to account then select newsletter subscription is shows unchecked checkbox. if I checked that and save, I got email to confirm newsletter subscription.

In Back-end I have set "Allow Guest Subscription" and "Need to Confirm" to "Yes"

So anyone have idea about that. Thanks

2

When you look at

app/code/core/Mage/Newsletter/Model/Subscriber.php

public function confirm($code)
{
    if($this->getCode()==$code) {
        $this->setStatus(self::STATUS_SUBSCRIBED)
            ->setIsStatusChanged(true)
            ->save();
        return true;
    }

    return false;
}

in this method if confimration code match then it just return true nothing else

If you want to send newsletter subscription success email after confirmation then you have to modify above code with just one line

$this->sendConfirmationSuccessEmail();

But make sure that you you are overwrite core file,,so your final code should be in

app/code/local/Mage/Newsletter/Model/Subscriber.php

public function confirm($code)
{
    if($this->getCode()==$code) {
        $this->setStatus(self::STATUS_SUBSCRIBED)
            ->setIsStatusChanged(true)
            ->save();
        // We are just adding below line 
        $this->sendConfirmationSuccessEmail(); // custom line
        return true;
    }

    return false;
}
  • Issue on here user didn't subscribe to news letter. When I confirm user registration confirm email. – Buddhika Dombawela Jul 30 '15 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.