TransVirtual continue to develop widgets that can be integrated into your own website for easier access to our systems. Functionality includes log in, quick tracking of consignments, and paying invoices online can be achieved by using these widgets.
Widgets can be found by going to Settings > General > Global Setup > Website Widgets:
Grab the code from the widgets here; simply click each widget and the code will appear bottom-right of the page.
Currently, widgets exist for the following activities:
- Logging into TransVirtual
- Creating customer accounts
- Tracking consignments
- Obtaining a price estimate for a delivery
- Paying an invoice
The widgets are referenced through html, which can be added into your site code accordingly. You only need to add two lines - a <script> tag and a <div> tag.
Be aware that WordPress does not recognize one of the attributes in the <div> tag and will strip it out when you compile the page. If you are using WordPress, a workaround exists to fix this. Please see below.
Our widgets all have a similar look thanks to a simple CSS styling applied to them. As an example, the login widget looks as follows:
This widget passes the username and password securely through to TransVirtual, and will log the user into the homepage of TransVirtual.
This widget takes user information and creates a customer login account attached to the main client account. The username will be "Online - " followed by the Company Name (if supplied) or the Name (if no Company Name supplied). Once the account is created, it will automatically log in. It will fail if:
- the email address is already in use
- the username it would create already exists
Consignment Tracking
There are two versions of this widget, a simple and a detailed tracking version. In both cases the widget takes the consignment number and searches the TransVirtual system without the requirement to explicitly log in.
The detailed version returns the following information:
- Consignment Status
- Consignment Number
- Sender
- Receiver
- Address
- Delivery Instructions
- Quantity
- Total Weight
- Scan History
The simple version returns the following information:
- Consignment Status
- Suburb
- Quantity and Weight
- Status History
Price Estimation
This widget takes the Sending and Receiving suburb plus the details of the items for delivery and returns a quote based on the information provided.
Invoice Payment
This widget takes the Invoice number and processes a payment accordingly. It can be configured to pre-populate the invoice number for ease of client use.
By default, Wordpress will strip out the rel='10000' from the Div tag. To Correct, edit functions.php file with the following addition:
<?php
function uncoverwp_tiny_mce_fix( $init )
{
$init['extended_valid_elements'] = 'div[*]';
return $init;
}
add_filter( 'tiny_mce_before_init', 'uncoverwp_tiny_mce_fix' );