as in the settings of non-active subscribers (Not Activated), transfer to the status of Subscribed, that is, subscribing to the news. I think that there is a way without following the subscription activation link.
1 answer
in system(ΡΠΈΡΡΠ΅ΠΌΠ°)->configuration(ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΡ)->ΠΊΠ»ΠΈΠ΅ΡΡ(customers)->newslatter(ΡΠ°ΡΡΡΠ»ΠΊΠ°)->ΠΠ°ΡΠ°ΠΌΠ΅ΡΡΡ ΠΏΠΎΠ΄ΠΏΠΈΡΠΊΠΈ(params newslater)->ΠΠ΅ΠΎΠ±Ρ
ΠΎΠ΄ΠΈΠΌΠΎ ΠΏΠΎΠ΄ΡΠ²Π΅ΡΠΆΠ΅Π½ΠΈΠ΅(requir apruve) settings system(ΡΠΈΡΡΠ΅ΠΌΠ°)->configuration(ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΡ)->ΠΊΠ»ΠΈΠ΅ΡΡ(customers)->newslatter(ΡΠ°ΡΡΡΠ»ΠΊΠ°)->ΠΠ°ΡΠ°ΠΌΠ΅ΡΡΡ ΠΏΠΎΠ΄ΠΏΠΈΡΠΊΠΈ(params newslater)->ΠΠ΅ΠΎΠ±Ρ
ΠΎΠ΄ΠΈΠΌΠΎ ΠΏΠΎΠ΄ΡΠ²Π΅ΡΠΆΠ΅Π½ΠΈΠ΅(requir apruve) set it to Π½Π΅Ρ(no) English localization It may not match as I wrote from memory.
to activate all non activated we write the shell
$newsletterCollection = Mage::getModel('newsletter/subscriber')->getCollection(); // ΡΠΈΠ»ΡΡΡΡΠ΅ΠΌ ΠΊΠΎΠ»Π»Π΅ΠΊΡΠΈΡ ΠΏΠΎ ΡΠ΅ΠΌ ΡΡΠΈ email Π½Π΅ ΠΏΠΎΠ΄ΡΠ²Π΅ΡΠΆΠ΄Π΅Π½Π½Ρ $newsletterCollection->addFieldToFilter('status',2); foreach($newsletterCollection->load() as $_newsletter) { $_newsletter->setStatus(1); // ΡΡΠ°Π²ΠΈΠΌ ΡΡΠ°ΡΡΡ ΠΏΠΎΠ΄ΡΠ²Π΅ΡΠΆΠ΄ΡΠ½ $_newsletter->save(); // ΡΠΎΡ
ΡΠ°Π½ΡΠ΅ΠΌ ΠΏΠΎΠ΄ΠΏΠΈΡΡΠΈΠΊΠ° echo $_newsletter->getEmail().'[ok]'.PHP_EOL; // Π΄ΠΎΠ±Π°Π²Π»ΡΠ΅ΠΌ Π²ΡΠ²ΠΎΠ΄ } how to write a shell? in the shell folder, create a file myshell.php
with content
require_once 'abstract.php'; class My_Shell_MyShell extends Mage_Shell_Abstract { public function run() { if ($this->getArg('run')) { $this->setStatus(); } } public function setStatus() { // ΡΡΡ ΠΊΠΎΠ΄ ΠΊΠΎΡΠΎΡΡΠΉ Π΄Π΅Π»Π°Π΅Ρ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΡΡ ΠΏΠΎΠ΄ΠΏΠΈΡΠΊΡ // ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»Π΅Π½ Π²ΡΡΠ΅ } } $shell = new My_Shell_MyShell(); $shell->run(); running the script
- log in ssh to server
- go to the shell folder
cd /path/to/mage/shell- run the script with the command
php -f myshell.php -- run
- thank you) yes, I have already installed No, but there was a time when Yes was there and people signed up at that time and I would like to activate them for mailings, but how ... I canβt find a solution - urbanlol
- oneI'll edit the answer right now - Naumov