if(!defined('DS'))
define('DS', DIRECTORY_SEPARATOR);
if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) return true;
$statisticsClass = hikashop_get('class.statistics');
$statisticsClass->display(array('last_orders' => array(
'slot' => 2,
'order' => 2,
'published' => 1,
'container' => 1,
'class' => 'hkc-lg-8 hkc-sm-12',
'type' => 'dynamic',
'label' => JText::_('HIKA_STATS_LAST_ORDERS'),
'vars' => array(
'COUNTER' => 6
),
'prefix' => '<table style="width:100%" class="table table-striped table-hover table-bordered"><thead><tr><th>'.JText::_('ORDER_NUMBER').'</th><th>'.JText::_('ORDER_STATUS').'</th><th>'.JText::_('CUSTOMER').'</th><th>'.JText::_('DATE').'</th><th>'.JText::_('PRICE').'</th></thead><tbody>',
'dynamic' => '<tr><td>{order_number:order_link}</td><td>{order_status:order_status}</td><td>{user_email}</td><td>{order_created:date}</td><td>{order_full_price:price}</td></tr>',
'suffix' => '</tbody></table>',
'format' => 'text',
'query' => array(
'get' => 'list',
'select' => 'hk_order.*, hk_user.*, hk_order.order_currency_id as currency',
'tables' => array(
hikashop_table('order') . ' AS hk_order',
'INNER JOIN '.hikashop_table('user').' AS hk_user ON hk_order.order_user_id = hk_user.user_id'
),
'filters' => array(
'order_type' => 'hk_order.order_type = '.$order_type.''
),
'order' => 'hk_order.order_created DESC',
'limit' => '{COUNTER}'
)
)));
That should work anywhere (in any PHP file) on a Joomla website with HikaShop if Joomla is already loaded.