I have install extension for a testimonial. now I want to send email to customer after 7 days of purchase to let them write their review on the testimonial page

how to do that?


To send an email on every 7 days you can use CRON job feature. I am assuming that you know how to create a module so to set CRON job for every 7 days you need to write crontab in your module config.xml

                <schedule><cron_expr>0 0 * * 0</cron_expr></schedule>

It will execute every 7 days on 00:00 time. If you want to customize then you can just customize CRON job expression. Here CRON expression is 0 0 * * 0 and the explanation of CRON expression is (source: wikipedia ),

enter image description here

Now you need to create an observer.php file(in model directory) with sendTestimonialEmail method.

class Training_Testimonial_Model_Observer

   public function sendTestimonialEmail()
    // perform your magic here
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.