Building a Virtual Economy for Shared Listing - Customizing WP Job Manager
The client wanted to create a platform where companies and people could share under-used human resources as well as physical resources like office equipment and spaces. However, unlike a conventional job management platform, this was to be rooted in virtual currency, called Cherry Coin. No real money would be exchanged between the employer and the employee. Instead, cherry coins would be used on the website as the medium of payment.
The way it works, customers pay to upload their ‘Share’ listing/requirement on the website while the applicants pay if they want to check the listing or submit a ‘Tender’ for a given requirement.
What the Project Involved
Platform for sharing of human and physical resources
System for transactions using virtual currency
Automated generation and management of orders at the back-end
Provision for sending Notification emails to Listing Authors and Applicants
Project Details - Client Requirements
There were certain shortcomings in the client’s existing solution, which shaped the client’s requirements in this project. Hence, before understanding the requirements, we briefly see why the client needed the customization in the first place.
- The number of Cherry Coins was not considered before a user could post a listing or apply for a job
- There was no system in place to keep a record of the Cherry Coin transactions, such as tracking their reduction when a user applies for a listing, refund if the application is rejected, and credit when a job is completed
- The order for a WooCommerce product associated with the listing was not provided by default
- The WP Job Manager plugin allows more than one application to be accepted for a listing; however, the status of the listing as filled even if one application is accepted
- The WP Job Manager plugin does not send notifications. In addition, there is no provision for the Author of a Listing to accept an application post the closing/expiry date. If any application is not accepted within six days post expiry, all applications are withdrawn and the applicants get their Cherry Coins back
Naturally, this meant that there was quite an extensive list of requirements for the website. Here’s what the client needed.
- Enabling transactions using Cherry Coins
- Allowing users to initiate an application/listing if the user/member had sufficient Cherry Coins
- Maintain extensive logs of Cherry Coins
- Automated creation and management of orders at the backend, along with the flow of applications using WP Job Manager
- Provision to accept only one application for a given proposal and reject all others
- Disabling of controls for changing the status of the application on the Application Dashboard
- Option to send notification emails to the Author of the Listing after it expires, provided a suitable application has not been found for it, at regular intervals
We addressed each requirement systematically, coming up with comprehensive solutions to satisfy it completely. Here is the customization we implemented.
- Conditional enabling of Cherry Coin Transactions, if they are in enough quantity
We coded the Apply button to be visible only if certain conditions were met - such as, a Listing Author could not apply to his own listing, users with only enough Cherry Coins can see the listing, etc. An error message was displayed to other users lacking the necessary Cherry Coins, with a custom setting for the Administrator to draft the message.
- Transaction log management
We created a custom table for maintaining the logs, as well as a log file within the custom plugin itself to maintain the logs. Cherry Coins had their own logs for all the transactions provided by the myCred plugin in the Admin Dashboard.
- Automated management of orders at the backend
Orders needed to be created since each listing was associated with a WooCommerce product, the cost of which was equal to the Cherry Coins paid by the to the applicant.
For instance, say a member creates an order for the associated product in the backend. Now, the order status should change as the listing status changes; i.e., if an application is accepted, the Order should be marked complete, if it is rejected, the applicant should receive a refund.
- Notification emails to Listing Authors
To implement this functionality, we wrote a CRON job which would execute everyday and check the status of every listing and application. Based on the latest update, such as whether a listing is live/expired or an application has been accepted/rejected, an email would be sent to the Author/Applicant with the relevant details.
- Accepting only one Application and Rejecting all others
To maintain integrity in transaction by accepting only one application and rejecting all others, we customized the dashboard to limit all functions after accepting the application. The Author could not make changes to the status of the application once it had been accepted. This was done by disabling the ‘Mark Filled’ and ‘Mark Not Filled’ options at the Admin end. The Dashboard was simultaneously configured to issue refunds to all the applications that had been rejected.
Some Additional Features
- Limited number of applications
The Author can choose to limit the number of incoming applications, post which all incoming applications are automatically rejected.
- Regular reminders to inform Author about pending listings
The Author is sent reminders about pending listings at regular intervals, which are decided previously. In addition, notifications are sent after the listing has expired for a fixed number of days. If the Author does not accept any application even after the date of expiry, all applications are automatically deleted, the applications refunded, and the owner notified accordingly.
- SMS notifications setup
SMS notifications were an additional feature incorporated along with email notifications. A SMS notification was sent to the listing owner every time an application was submitted and to the candidate if his/her application was accepted.
- Reward points setup
Reward points were assigned to the listing owner based on the quickness of their response and to the candidate based on the quality of work. These reward points could be further used as a search criterion for finding the appropriate job listing or skilled candidates.