Hello!
Joomla_3.4.5 + Virtuemart.3.0.12
Now I have the Number of order like L8R60118. But I want to make it like 00118.
I have edited file /administrator/components/com_virtuemart/models/orders.php :
static public function generateOrderNumber($uid = 0,$length=4, $virtuemart_vendor_id=1) {
$db = JFactory::getDBO();
$q = 'SELECT COUNT(1) FROM #__virtuemart_orders WHERE `virtuemart_vendor_id`="'.$virtuemart_vendor_id.'"';
$db->setQuery($q);
//We can use that here, because the order_number is free to set, the invoice_number must often follow special rules
$count = $db->loadResult();
$count = $count + (int)VM_ORDER_OFFSET;
//if(!class_exists('vmCrypt'))
// require(VMPATH_ADMIN.DS.'helpers'.DS.'vmcrypt.php');
//$data = vmCrypt::getHumanToken($length).'0'.$count;
$data = '00'.$count;
return $data;
}
But no effect.
What is wrong?
http://open-tools.net/virtuemart/advanced-ordernumbers.html ?
They have stopped the development of that plugin.
Maybe someone have a good alternative?
Also see topic https://forum.virtuemart.net/index.php?topic=142406.0 (https://forum.virtuemart.net/index.php?topic=142406.0)