Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Custom order number, or at least custom starting number
 
Magentourist
Member
 
Total Posts:  48
Joined:  2008-08-11
Berlin
 

I’d also like to know how to make Magento use the alphanumeric method for generating the number.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magentourist
Member
 
Total Posts:  48
Joined:  2008-08-11
Berlin
 

I’m using the alphanumeric generator class by changing the setting in the database. Is that really the way to go?
Still didn’t get the custom module to work and did a core hack hmmm

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-05-06
 

To the admin, totally necessary!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magentourist
Member
 
Total Posts:  48
Joined:  2008-08-11
Berlin
 

I’ve changed the setting in the database now to use the alphanumeric increment. It works in the database but the invoice overview page displays the invoice numbers incorrectly. E.g. the number is 500ABC000003 in the database it is displayed as 500. Is guess that only the leading integer portion is displayed. Before diving into the templates trying to figure out how to fix it (other views display the whole number) I’m asking again if there is a simpler way to change the increment method from numeric to alphanumeric?

 
Magento Community Magento Community
Magento Community
Magento Community
 
invitro59
Member
 
Total Posts:  58
Joined:  2008-02-14
 

Hi

After reading all the post it looks like I and lots of magento users are not able to get invoice number change to work

Could someone help me to make something work like below

C8120001 for orders
F8120001 for invoices

I tried all what is in this post and nothing worked.

the only modification that worked was changing $padLenght= 8; and instead of 1000000001 it gave me 16 ???????? so not really what I am looking for.

I did not even found nor understand where are stored order and invoice numbers (or they are the same???)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ignacio Bona
Jr. Member
 
Total Posts:  10
Joined:  2008-11-07
Spain
 

Here is a piece of information:

http://www.magentocommerce.com/boards/viewthread/25668/

 
Magento Community Magento Community
Magento Community
Magento Community
 
invitro59
Member
 
Total Posts:  58
Joined:  2008-02-14
 

Hi

Forgot about that post !

I found over the internet an sql piece of code that makes possible to reset all datas and change invoice numbers if you want.
I tried on 1.1.8 and it worked for me so if anyone needs it he can just send a PM.
I was able to re-use the store and place it on a production server, tested and everything seems to work

Thank’s anyway

 
Magento Community Magento Community
Magento Community
Magento Community
 
invitro59
Member
 
Total Posts:  58
Joined:  2008-02-14
 

Hi

I place here the link of the website that gives the SQL file to reset or change invoice numbers the way you like :

http://eliasinteractive.com/blog/magento-ecommerce-how-to-reset-all-test-order-information-and-set-unique-prefix-for-orders-invoices-shipments-and-credit-memos/

regards
invitro59

 
Magento Community Magento Community
Magento Community
Magento Community
 
pigbone
Jr. Member
 
Total Posts:  3
Joined:  2008-10-07
 

has anyone tried this solution? http://bit.ly/hOzs

 
Magento Community Magento Community
Magento Community
Magento Community
 
back2007
Member
 
Total Posts:  59
Joined:  2009-03-30
 

Also interested in this, can develop myself, however would love to save some time and get something ready.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brain169
Jr. Member
 
Total Posts:  1
Joined:  2009-04-29
 

I made it. If you want your order-number to be like 1001 instead of 100000001 try this:

Go to:
/shop/app/code/core/Mage/Eav/Model/Entity/Increment/

Edit abstract.php

Change:

public function getPadLength()
    
{
        $padLength 
$this->getData('pad_length');
        if (empty(
$padLength)) {
            $padLength 
8;
        
}
        
return $padLength;
    
}

to:

public function getPadLength()
    
{
        $padLength 
3;
        return 
$padLength;
    
}

Use common methods to edit starting number (db => eav_entity_store => increment_last_id).

Good luck smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
usulfr
Jr. Member
 
Total Posts:  11
Joined:  2008-09-12
 

For my part, I had the following problem : multiple websites pointing at a single paypal account : paypal does not allow paying an order with a number already given to another order. (am I clear ?) Result was that some customers could not pay because their order number had already been paid (by someone else on another website). Changing the starting order number solved this issue.
database => eav_entity_store => change the increment_last_id in this table (used phpMyAdmin to achieve this). Tested it and it works properly on version 1.3.1

@ AdjustWare :
Your extension looks very interesting for all of those looking for having customised numbers for their invoices, for a correct price ($39).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

Repost from http://www.magentocommerce.com/boards/viewthread/10985/

update `eav_entity_type` set `increment_pad_length`=5 where `entity_type_code`=’order’;
update eav_entity_store inner join eav_entity_type on eav_entity_type.entity_type_id = eav_entity_store.entity_type_id set eav_entity_store.increment_last_id=26652 where eav_entity_type.entity_type_code=’order’;

I also changed padlength in app/code/core/Mage/Eav/Model/Entity/Increment/Abstract.php

public function getPadLength()
{
$padLength = $this->getData(’pad_length’);
if (empty($padLength)) {
$padLength = 0;// Was 8
}
return $padLength;
}

I don’t know if the code change was important, however I now have sensible length order numbers.

I then updated the others:

update eav_entity_store inner join eav_entity_type on eav_entity_type.entity_type_id = eav_entity_store.entity_type_id set eav_entity_store.increment_last_id=67281 where eav_entity_type.entity_type_code=’invoice’;
update `eav_entity_type` set `increment_pad_length`=5 where `entity_type_code`=’invoice’;
update eav_entity_store inner join eav_entity_type on eav_entity_type.entity_type_id = eav_entity_store.entity_type_id set eav_entity_store.increment_last_id=32495 where eav_entity_type.entity_type_code=’shipment’;
update `eav_entity_type` set `increment_pad_length`=5 where `entity_type_code`=’shipment’;

I hope you can see what has gone on there. It works fine.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pigbone
Jr. Member
 
Total Posts:  3
Joined:  2008-10-07
 

A few weeks ago i ran across a company called Adjustware that has an order number extension for Magento:  http://bit.ly/1atfSV . My link in my previous post used to go to the Adjustware extension purchase page on the Magento Commerce site but it does not anymore. There also used to be a post from Adjustware right after my previous post but it looks like it was deleted.

Has anyone used this extension successfully? I would like to try it but would like to hear if others have had any issues with it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

Just update the code to whatever you want using the SQL in my earlier post and be done with it. Forget poxy paid for extensions - you can get it done in 2 minutes of phpmyadmin time.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top