You can customize order/invoice/creditmemo/shipment number (increment_id
) by editing the following class:
Mage_Eav_Model_Entity_Increment_Numeric
Especially, closely look at the code of the following methods:
getNextId()
, getPrefix()
, getPadLength()
, format($id)
Now, you won't find the method definition for methods getPrefix()
, getPadLength()
because these are magic getter methods. You can define these methods according to your desire.
For an example:
public function getPrefix(){
$prefix = $this->_getData('prefix');
/* Do some customization */
return $prefix;
}
public function getPadLength()
{
$padLength = $this->_getData('pad_length');
/* Do some customization */
return $padLength;
}
This way, you don't have to manually change anything in the database structures for this to achieve.
Hope this will help you.