paGO Checkout triggers utilizing the Joomla! Plugin API
Learn how to build a custom paGO Checkout plugin utilizing triggers.
Simply put, this plugin allows you to customize trigger actions within the paGO Checkout. Using this simple plugin, you can control almost any aspect of the data collected during the checkout process, as well as manipulate things such as customer status and more.
If you’re a developer, you’ll understand the code and instructions below pretty easily.
If you’re a paGO shop owner, or you’re looking at paGO for your next ECommerce shop, consult your developer or contact us to see how this plugin can be customized for your needs.
- Firstly, if you have not already gotten paGO Commerce, download paGO!
- Next, you will need to install the package, here is the documentation in the case you need help: https://corephp.gitbooks.io/pago-commerce/content/chapter1.html
Developing the plugin
- After installing the software to your Joomla! site, open your project’s directory with your favorite IDE/text-manager.
- Next, navigate to `my-project/plugins/pago_orders/example_order`, copying the ‘example_order’ folder and changing all of the namespaces to fit your needs (saves a little time).
- Within `my-project/plugins/pago_orders/example_order/example_order.php`, you’ll want to create a constructor like this (if the constructor does not already exist):The constructor will allow you to access/add to paGO Commerce’s hook api using KDispatcher (KDispatcher is used to trigger events in paGO (This is the hook api for pago))
- After you have setup the constructor, you can begin to add anything you want! From sending emails to users after a successful purchase to dynamically sending a report of the products a user has purchased to a CRM (the CRM must have an API capable of said request); honestly the sky’s the limit for whatever events you’d like to create!
NOTE: Make sure to ENABLE the plugin after you have installed/edited the files! Afterwards your plugin should do exactly as you designed it to!