Automated Birthday Coupons Emails via a cron job.

 

Requires ABPro 3.0.6 and above. 

 

Download

Joomla 3.5.1(+) - ABPro 4.0.1+

mod_sv_birthdayb3 beta 3 Sep 9/16 

Joomla 3.3+ - ABPro 4.0.1+

mod_sv_birthdayb2 beta 2 Apr 27/16 

Joomla 3.3+ - ABPro 3.0.6+

mod_sv_birthdayb1 beta 1 Feb 12/15 

 

 

Overview

This module, when run from a cron job, will look at the date of birth in the Joomla Profile Plug-in to determine if a birthday coupon(s) need to be created and sent.

Web applications are passive and can only respond to requests for pages. A web application cannot 'wake up' and take action on its own. To do that you need a scheduled task or cron task running on your web server. This module provides a mechanism to have your server send 'Birthday Coupon' messages automatically by setting up a cron job to call the module during the night.

The module mod_sv_birthday, an add-on to ABPro, does not do automated emails by itself. The module installs a file, sv_birthday_cron.php, that can be called by your server's cron facility and when it is, it will look at the module parameters and create/send birthday coupon(s) based on the settings you specify in the module setup. The module needs to be 'Published' but need not appear on any site page. It is really just a way to let you set parameters for the sv_birthday_cron.php to read at runtime.

 

Installation and Setup

Step 1 Download and install the module
  Download from link above then install as with any other module - nothing special here.

Step 2 Modue Setup
 

Set Status = Published
and Show TitleHide

 

Days Before to Send

Enter a number days before a person's birthday that you wan to send a coupon. 

Valid days before and after:

You can choose to send a coupon that is only valid on the customer's birthday, of you can set a windo of days before and/or after that the coupon is good for.

 

Birthday email text:

The text of the message that is sent is setup in the ABPro Message Center under the Global message set.

Test Mode:
For testing, see below.

 

Set menu assignments to 'all pages'

 


Step 3 Cron Setup
 

After you have the module installed and configured, your next step is to setup or schedule the cron job at your webserver.  Each hosting provider will have their own unique process for exactly how to do this.  But in each case, you need to create and name a new Cron job, define how often the Cron job should run (this should be once per day), and point the Cron job to the correct path to the sv_thankyou_cron.php file.  Below are 2 video tutorials that will demonstrate the setup procedures for common hosts.

You need to know the physical path, on the server, to the file sv_birthday_cron.php

The samples below are for the reminders module, the same procedure applies to the reminders module, just replace 'reminders' with 'birthday' in the examples below.
There is a file included in the module to do this for you. From your browser issue the request:

http://yoursite.com/modules/mod_sv_birthday/show_path.php

You will get back a screen like this..

 

Cron setup tutorials

 


Step 4 Testing
 

The file sv_birthday_cron.php has some code at the beginning to prevent it from being called interactivity by a malicious user.

For testing you can set 'Test Mode' (above) to Yes and call sv_thankyou_cron.php from your browser like:
http://yoursite.com/modules/mod_sv_thankyou/sv_birthday_cron.php

When calling as above, you will just get a results screen and the results will also be emailed out.