I placed the code at the beginning as shown below, but no order number appeared in the statement. Did you really mean to place the code at the beginning where I put it or should I have placed the code later in the file? If this is wrong, maybe you could specify the code block before which I should have placed the new code.
Thanks,
<?php
/**
* @package HikaShop for Joomla!
* @version 2.2.0
* @author hikashop.com
* @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php
$product = explode('<|>',$this->vars['x_line_item'][0]);
$this->vars['x_description'] = $product[1];
$db = JFactory::getDBO();
$db->setQuery('SELECT max(order_id)+1 FROM #__hikashop_order;');
$this->vars['x_invoice_num'] = $db->loadResult();
?>
<?php if ($this->payment_params->api == 'dpm' && @$this->payment_params->iframe){
$url=urlencode(base64_encode(serialize($this->vars)));
?>
<iframe name="frame" scrolling="auto" height="1000" width="660" Frameborder="no" src="<?php echo $vars["x_relay_url"].'&iframe='.$url;?>"></iframe>