Remind Customers to Place Their First Order in Magento

June 6, 2016 | Author: Alberto Braschi | Category: N/A
Share Embed Donate


Short Description

Remind Customers to Place Their First Order in Magento...

Description

Home Blog Magento WordPress Online Marketing Mobile development Tools & Frameworks Fun & Events Portfolio Magento Services Inchoo Contact

Get the most out of Magento Over 140,000 people searching for Magento related solutions end up on this site every month. See what we offer and discover why. HomeBlogE­CommerceMagentoEmailRemind customers to place their first order in Magento

Remind customers to place their first order in Magento 31st MAY 2013 | Posted by Marko Martinovic in Email, Extensions, Magento, Orders, Programming

Sometimes customers need a little encouragement to place their first order after creating an account. There are many reasons this is the case, for example customers may forget to bookmark your site, thus

they might have difficulties finding your store second time around. In this article I’ll present one way of keeping an eye on your customers orders count and sending first order reminder emails, trough free Magento extension named Inchoo_OrderReminder. Introduction Source code for Inchoo_OrderReminder is available from its GitHub repository page, as usual here I’ll just present it’s features and some code snippets. So here are the features of Inchoo_OrderReminder: Can send reminder emails to customers who haven’t placed any orders yet, on configurable interval in days. Maximum number of email reminders is also configurable, as well as action to take after sending last email reminder (move to different customer group or delete an account). Regular and last order reminder email templates are configurable trough Magento’s transactional email templates feature. Configurable reminder email sender identity as well as sending reminder emails to additional email addresses as copy or Bcc Here’s the screenshot of configuration options available at System ­> Configuration ­> Sales Emails ­> Order Reminders inside your Magento admin area:

Background In this section I’ll present some code and basic logic behind Inchoo_OrderReminder. Inchoo_OrderReminder_Model_Observer::processOrderReminders() function is configured to be triggered by cron daily to process customers according to the configuration options. Here’s the config.xml code snippet for that purpose:

1 2 3 4 5 6 7 8 9 10 11

                                                            0 1 * * *_log('Preparing email...');     // Get necessary vars     $copyTo = $this­>_getStoreConfigCopyTo();     $copyMethod = $this­>_getStoreConfigCopyMethod();     $storeId = Mage::app()­>getStore()­>getId();     // Uses code from Mage_Sales_Model_Order::sendNewOrderEmail(     $mailer = Mage::getModel('core/email_template_mailer');     $emailInfo = Mage::getModel('core/email_info');     $emailInfo­>addTo($customer­>getEmail(), $customer­>getName(     if ($copyTo && $copyMethod == 'bcc') {         // Add bcc to customer email         foreach ($copyTo as $email) {             $emailInfo­>addBcc($email);             $this­>_log(sprintf('Add %s to Bcc.', $email));         }     }     $mailer­>addEmailInfo($emailInfo);     // Email copies are sent as separated emails if their copy m     if ($copyTo && $copyMethod == 'copy') {         foreach ($copyTo as $email) {             $emailInfo = Mage::getModel('core/email_info');

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

            $emailInfo­>addTo($email);             $mailer­>addEmailInfo($emailInfo);             $this­>_log(sprintf('Will send a copy to  %s.',          }     }     // Set all required params and send emails     $mailer­>setSender($this­>_getStoreConfigIdentity(), $storeI     $mailer­>setStoreId($storeId);     $mailer­>setTemplateId($template);     $mailer­>setTemplateParams(         array(             // Customer object             'customer' => $customer,             // Reminder for number of days             'reminder_days' => $reminderKey,             // Last reminder number of days             'reminder_limit' => $reminderLimit         )     );     // Send     $mailer­>send();     $this­>_log('Email sent.'); }

What to do next? For more details about Inchoo_OrderReminder you can always checkout and download up­to­date code from Inchoo_OrderReminder’s GitHub repository page. Cheers and happy coding! 1 Top Enjoyed this post? Subscribe to our RSS Feed, Follow us on Twitter and spread it to your friends! 8 Tweet

1 Like

1

Author

Marko Martinovic Backend Developer If you ask him – “Marko, how do you relax in your free time?”, he would most probably say: – “I write some code.” Let’s cut to the chase, he is one passionate programmer who currently lives his dream by working for Inchoo. Other posts from this author

Related Posts Per product meta robots tag control in Magento Print message in all languages using single store, date on specified localization Inchoo Flickr Gallery Magento Extension Create configuration for your Magento extension Basic folder structure for new Magento Extension

Discussion 1 Comment Add Comment

1. 

 Michael 05­06­2013 at 8:28 | # It’s a great extension! this is working for us and helping to convert more prospects to customers in our store.

Add Your Comment Name (required)  Website

Your Comment

 Email (required) 

Post Comment

 Notify me of followup comments via e­mail Please wrap all source codes with [code][/code] tags. Top Search and you shall find... 

  Search

Refine Posts by News49 Starting up37 Marketing32 Products38 Search8 Frontend81 Checkout13 Administration46 Configuration22 Email15 Upgrading9 Orders23 Payment8 Shipping7 Extensions74 MVC9 Events & Observers12 Programming112 Database21 Debugging35 Integration25 Design11 Magento GO2

We can make your store more efficient Have a chat with our Magento Consultants. You would be surprised how small changes can make your business even more successful. Learn more Get a quote

Hire Magento Developers

Teams of certified Magento developers are available to work on your next big thing! Hire Magento Developers Get a quote

Our Latest Project

Shop Supplies ShopSupplies.com.au is an online business with a great range of quality shop fittings in Sydney, Australia. See our work

The Inchooers

Meet The Inchooers, the funny bunch of magento developers. Archive

New Comments Hillel on USPS fix for Magento CE 1.4.x: Thank you very much for this fix, I was having the same prob... Jagesh on Adding a new tab under one page checkout – full working module:

Is it possible to show extra tab and add that value in sales... Rased on Programatically add bundle product to cart in Magento: Hi, I am facing a problem and can't figure out the things w... Nilesh on USPS fix for Magento CE 1.4.x: I am getting the following error, please help!!!! Call ... Michael on Remind customers to place their first order in Magento: It's a great extension! this is working for us and helping ... Ron on Product Stock Alerts (not) working: Thanks, but I tried t before hand, and again: Flushed magen... Ivan Galambos on Product Stock Alerts (not) working: Hi Ron, I believe it's because of cache... try to clear M...

5721 Followers Follow us

2902 Readers Subscribe

2479 Likes Find Us

626 Followers Follow Us

407 Subscribers Subscribe

Last Tweet 3 Tips for Tablet Commerce #Usability ­ http://t.co/0XTUWHfWpS via @getelastic

Blog Categories Magento WordPress Online Marketing Mobile development

Tools & Frameworks Zend Fun & Events

Services Magento Consulting Magento Design Magento Development E­commerce Consulting E­commerce SEO E­commerce AdWords

Get a Quote Its fast and easy, just tell us a little bit about your project Name (required)  Email (required)  Enviar

 Sitemap Our Commitment Since we’ve been with Magento from its very beginning, we built a very distinctive knowledge of it. Besides being an Accredited Silver Partner, we now have fourteen Developers officially Certified by Magento. In short, it means cost­efficiency and a high­quality project outcome.

15x 

 

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF