Magento Forum

   
Page 1 of 8
How to send newsletter to one or more of the customer groups ??? 
 
Samson
Jr. Member
 
Total Posts:  11
Joined:  2008-01-08
 

Hello,
please I need some help I can’t figure how to do this properly.
Thx in advance,
Xavier

 
Magento Community Magento Community
Magento Community
Magento Community
 
RH
Sr. Member
 
Avatar
Total Posts:  81
Joined:  2007-10-09
 

This may help.

http://www.magentocommerce.com/boards/viewthread/1593/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Samson
Jr. Member
 
Total Posts:  11
Joined:  2008-01-08
 

Thanks you for your link.
I managed to send the newsletter by calling manually /admin/newsletter_queue/sending

 
Magento Community Magento Community
Magento Community
Magento Community
 
iguru
Guru
 
Avatar
Total Posts:  331
Joined:  2007-11-01
Děčín, Czech Republic
 

Please write full help how do you send newsletter. I don’t find newsletter_queue hmmm

 
Magento Community Magento Community
Magento Community
Magento Community
 
BlackDesk
Member
 
Avatar
Total Posts:  35
Joined:  2008-03-10
San Diego
 

Just add the /admin/newsletter_queue/sending to the end of your store url, press enter, and bingo, it sends!

But seriously - are you kidding? How can there not be a bleeping ‘send’ button in the newsletter interface?????????????

AGHHHHAhhhhHA HA HA HA HA HA AHAA HA AA>..a/sdfasd>?,?./////...........s.asf...2.....ga ha ah haaaa

between this and importing i am losing my marbles (can u tell?)

I REALLY want to believe in you Magento…

 
Magento Community Magento Community
Magento Community
Magento Community
 
iguru
Guru
 
Avatar
Total Posts:  331
Joined:  2007-11-01
Děčín, Czech Republic
 

Thx Master.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  888
Joined:  2008-04-28
London, UK
 
BlackDesk - 01 May 2008 06:34 PM

Just add the

/admin/newsletter_queue/sending

to the end of your store url, press enter, and bingo, it sends! ...

OMG. This works. Many many thanks, Samson. @BlackDesk - I share your frustration!
@Samson - you’re a star for sharing this with us!
smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
alistek
Sr. Member
 
Total Posts:  293
Joined:  2008-04-02
Normal, IL
 

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('*/*');
    
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
leetaylordoes
Sr. Member
 
Total Posts:  227
Joined:  2008-02-05
San Diego, CA
 

Hi there All,

Thanks for the previous work on this.

So I think I’ll just create a “send now” button and correctly override the controller. The scripts above are helpful @alistek. Much appreciated.

My only question, how does the send process work?
- does it send ALL pending newsletters that haven’t been sent yet?
- does it only send the last pending newsletter? (what If I have 2+ pending newsletters waiting to be sent?)

I’m not sure on the process flow.

Your ideas are appreciated.

Thanks,
Lee

 
Magento Community Magento Community
Magento Community
Magento Community
 
regispatuto
Jr. Member
 
Total Posts:  21
Joined:  2008-02-22
 

I updated the code, but it still doesn’t seem to send.  When I select Start from the dropdown, it brings me back to the Queue and it says Not Started.  Any thoughts, I am in version 1.0 still.

 
Magento Community Magento Community
Magento Community
Magento Community
 
leetaylordoes
Sr. Member
 
Total Posts:  227
Joined:  2008-02-05
San Diego, CA
 

Hey there, I’ll try to post the files in a zip folder that I’ve changed and corrected the issues with.

I’ve created a “Send Newsletter” button just for easier use (though the “start” feature should work via version 1.0), and added the correct redirection code in.

Would this help solve your issues?

If so, I’ll try to post them soon. How urgent is your issue?

Thanks,
Lee

 
Magento Community Magento Community
Magento Community
Magento Community
 
manu2008
Jr. Member
 
Total Posts:  14
Joined:  2008-05-27
 

Do you want a send newsletter for the admin? Cant fin the button? Create it!

Go to /app/design/adminhtml/default/default/template/newsletter/queue/list.phtml

and add the following after the last line (line 33 for me):

<br><br><div align="center"><b><h3 class="icon-head head-newsletter-queue"><a href="/MAGOX/index.php/admin/newsletter_queue/sending">Send News Letter</a></h3></b></div>

Save & refresh...da da! 
Your backoffice now has a simple link that will send your newsletter that you already have in the queue. It is basic...but it works!
Manu

 
Magento Community Magento Community
Magento Community
Magento Community
 
Janek
Jr. Member
 
Total Posts:  16
Joined:  2008-02-17
 

But the question is - how to do newsletter sending automatically, by cron?

DJ

 
Magento Community Magento Community
Magento Community
Magento Community
 
Janek
Jr. Member
 
Total Posts:  16
Joined:  2008-02-17
 

OK, I found it.
It needs editing crontab on server, adding entry like this

*/5 * * * * /absolute/path/to/php5 -f /absolute/path/to/magento/cron.php

and it automatically send enqueued newsletters, those with defined start date (send it on due date, of course).
If date of starting newsletter was not defined, it need choosing “Start” from dropdown on queue list first, then cron do the sending on next sheduled run.

--
DJ

 
Magento Community Magento Community
Magento Community
Magento Community
 
Janek
Jr. Member
 
Total Posts:  16
Joined:  2008-02-17
 

When you turn on above mentioned crontab - then alistek’s changes to core files are NOT neccesary!!! Unless you need instant sending of scheduled ahead newsletters.

DJ

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shamans
Jr. Member
 
Total Posts:  26
Joined:  2008-04-21
 
Janek - 19 June 2008 12:09 AM

When you turn on above mentioned crontab - then alistek’s changes to core files are NOT neccesary!!! Unless you need instant sending of scheduled ahead newsletters.

DJ

I can verify that the above (by Janek) works…

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 8