|
Hello,
Your right it is rather odd and the reason being is that in the backend code for whatever reason the Send button points to the wrong function. You can just change what function it calls on the backend to the sending function and low and behold it works. I have done that, it is a simple change to make and it works wonders.
Change this code in file:
app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php
Original:
if($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_NEVER) { if(!$row->getQueueStartAt() && $row->getSubscribersTotal()) { $actions[] = array( 'url' => $this->getUrl('*/*/start', array('id'=>$row->getId())), 'caption' => Mage::helper('newsletter')->__('Start') ); }
Rewritten:
if($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_NEVER) { if(!$row->getSubscribersTotal()==0) { $actions[] = array( 'url' => $this->getUrl('*/*/sending', array('id'=>$row->getId())), 'caption' => Mage::helper('newsletter')->__('Start') ); }
-Adam
Note: This method of overwriting this block is not upgrade proof. I haven’t done it the correct way yet just so you know.
EDIT:
This will send but it will bring you to a blank page and that is not ideal so change this code to redirect back to the grid view.
File: /app/code/Mage/Adminhtml/controllers/Newsletter/QueueController.php
Original:
public function sendingAction() { // Todo: put it somewhere in config! $countOfQueue = 3; $countOfSubscritions = 20;
$collection = Mage::getResourceModel('newsletter/queue_collection') ->setPageSize($countOfQueue) ->setCurPage(1) ->addOnlyForSendingFilter() ->load();
$collection->walk('sendPerSubscriber', array($countOfSubscritions)); }
Changed:
public function sendingAction() { // Todo: put it somewhere in config! $countOfQueue = 3; $countOfSubscritions = 20;
$collection = Mage::getResourceModel('newsletter/queue_collection') ->setPageSize($countOfQueue) ->setCurPage(1) ->addOnlyForSendingFilter() ->load();
$collection->walk('sendPerSubscriber', array($countOfSubscritions));
$this->_redirect('*/*'); }
|