
A Joomla Scheduled Task plugin that automatically cancels Phoca Cart orders whose Invoice Due Date has passed while the order is still unpaid.
Phoca Cart supports an "Invoice Due Date Days" setting for offline/invoice payments, but has no built-in mechanism to act on it once the date passes. This plugin fills that gap: it runs on a schedule, finds overdue unpaid orders, and moves them to a "Cancelled" status — going through Phoca Cart's own status-change pipeline so stock, points, order history and customer notification emails all behave exactly as they would for a manual status change in the admin.

Triggering the task
Joomla can run scheduled tasks two ways:
CLI cron (php cli/joomla.php scheduler:run) — simplest if you have shell/SSH access, but runs in a ConsoleApplication context.
Web Cron — a webhook URL (System → Scheduled Tasks → Options → Webcron) hit by curl/wget from a regular hosting cron job.
Runs inside a full Joomla SiteApplication context.
This plugin needs Web Cron, not CLI cron. Phoca Cart's own code for generating email/PDF invoice content relies on a full Joomla Document object (Factory::getApplication()->getDocument()), which is only available in a Site/Administrator web context — not in the CLI console application. Running this task over CLI can prevent the customer notification email from being sent.
Example cron entry (adjust interval to match the task's own):
Code: Select all
curl -s -o /dev/null "https://YOURSITE/component/ajax?plugin=RunSchedulerWebcron&group=system&format=json&hash=YOUR_WEBCRON_HASH&id=YOUR_TASK_ID"Requirements
Joomla 5.x / 6.x with com_scheduler (core, Joomla 4.1+)
Phoca Cart 6.1.x
License
GNU General Public License v3.0 or later
FREE!
DOWNLOAD ON GitHub
Screenshots


