You must create a local copy: application / code / kernel / Mage / Newsletter / controllers / SubscriberController.php Application / code / kernel / Mage / Newsletter / model / Subscriber.php
In the /code/core/Mage/Newsletter/controller/SubscriberController.php application, add after line 44:
$firtname = (string) $this->getRequest()->getPost('firstname'); $lastname = (string) $this->getRequest()->getPost('lastname');
Then change from:
$status = Mage::getModel('newsletter/subscriber')->subscribe($email);
in
$status = Mage::getModel('newsletter/subscriber')->subscribe($email,$firtname,$lastname);
Now in app / code / core / Mage / Newsletter / Model / Subscriber.php edit the signature of the signature on line 307 with
public function subscribe($email)
in
public function subscribe($email,$firstname,$lastname)
Add this after line 338:
$this->setSubscriberFirstname($firstname); $this->setSubscriberLastname($lastname);
And add getters and setters for it:
public function getFirstname() { return $this->getSubscriberFirstname(); } public function setFirstname($value) { return $this->setSubscriberFirstname($value); } public function getLastname() { return $this->getSubscriberLastname(); } public function setLastname($value) { return $this->setSubscriberLastname($value); }
You also need to add the firstname and lastname columns to the newsletter_subscriber, as indicated by another anwser.
source share