is there way use strtoupper save order number uppercase? can't find number being created , pushed database.
anyone know process happens? can make work if knew look.
can help??
anyone know process happens? can make work if knew look.
can help??
never mind, figured out. file:
administrator/components/com_virtuemart/models/orders.php
the change around line 973 adding strtoupper @ $data
administrator/components/com_virtuemart/models/orders.php
the change around line 973 adding strtoupper @ $data
code: select all
public function generateordernumber($uid = 0,$length=10, $virtuemart_vendor_id=1)
{
$db = jfactory::getdbo();
$q = 'select count(1) #__virtuemart_orders `virtuemart_vendor_id`="'.$virtuemart_vendor_id.'"';
$db->setquery($q);
//we can use here, because order_number free set, invoice_number must follow special rules
$count = $db->loadresult();
$count = $count + (int)vm_order_offset;
// vmdebug('my db creating ordernumber vm_order_offset '.vm_order_offset.' $count '.$count, $this->_db);
// $variable_fixed=sprintf("%06s",$num_rows);
$data = substr( md5( session_id().(string)time().(string)$uid )
,0
,$length
).'0'.$count;
return strtoupper($data);
}
Comments
Post a Comment