Automated Post Booking (Thank You) Emails via a cron job.

 

 

Download

Joomla 3.9 - ABPro 4.0.3

mod_sv_thankyou1b6 beta 5 Jan 22/21 

Joomla 3.5.1(+) - ABPro 4.0.1

mod_sv_thankyou1b5 beta 4 Oct 3/16 

 

 

Overview

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 'thank you' or 'time to re-book' messages automatically by setting up a cron job to call the module during the night.

The module mod_sv_thankyou, an add-on to ABPro, does not do automated emails by itself.

It installs a file, sv_thankyou_cron.php, that can be called by your server's cron facility and when it is, it will look at the module parameters and send thank you emails to bookings with a status 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_thankyou_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 Enabled = Yes
and Show Title = No

You can set the Menus to None as it does not need to appear on any page.

 

 

Parameters

Days After Booking:
Enter a number days after the booking time that you wish the email to be sent.

Component:
Select either ABPro (Joomla 3.x) or ABPro (Joomla 2.5)

Send to Booking status:
Specify what booking status to send to. If you manually change each booking to 'completed' after the appointment takes place, you can set the job to only send to 'completed' bookings. The default is 'accepted' and assumes the booking took place.

Email Results To:
You can enter an email address that will receive a status report after each cron run.
If left blank the report will be sent to the email address in the component's Configure / MailTO setting.

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_thankyou_cron.php

The samples below are for the reminders module, the same procedure applies to the thankyou module, just replace 'reminders' with 'thankyou' 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_thankyou/show_path.php

You will get back a screen like this..

 

Cron setup tutorials

 


Step 4 Testing
 

The file sv_thankyou_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_thankyou_cron.php

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