Magento Newsletter mit double opt. in auch bei bestandskunden


/ Published in: Other
Save to your folder(s)

Damit meine Änderungen bei einem nächsten Update von Magento nicht überschrieben werden, kopiere ich mir die Datei inklusive Verzeichnisstruktur aus dem “core” ins “local” Verzeichnis.

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

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


Copy this code and paste it in your HTML
  1. if ($customerSession->isLoggedIn()) {
  2. $this->setStoreId($customerSession->getCustomer()->getStoreId());
  3. $this->setStatus(self::STATUS_NOT_ACTIVE);
  4. $this->setCustomerId($customerSession->getCustomerId());
  5. } else if ($customer->getId()) {
  6. $this->setStoreId($customer->getStoreId());
  7. $this->setSubscriberStatus(self::STATUS_NOT_ACTIVE);
  8. $this->setCustomerId($customer->getId());
  9. } else {
  10. $this->setStoreId(Mage::app()->getStore()->getId());
  11. $this->setCustomerId(0);
  12. $isNewSubscriber = true;
  13. }

URL: http://jerie.de/magento/magento-newsletter-fur-deutschland/

Report this snippet


Comments


You need to login to view comments.