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

Page 7 of 7
Custom order number, or at least custom starting number
 
mattb13
Jr. Member
 
Total Posts:  13
Joined:  2011-12-23
 

The same problem....

 
Magento Community Magento Community
Magento Community
Magento Community
 
Extendware
Sr. Member
 
Avatar
Total Posts:  231
Joined:  2011-08-04
 

Mattb13, do you have a number needing that is not addressed by the Custom Order Numbering extension?

 
Magento Community Magento Community
Magento Community
Magento Community
 
sprinnet
Sr. Member
 
Avatar
Total Posts:  140
Joined:  2009-01-12
Prague, Czech Republic
 

Wow, I see a new clone of FlexInvoice ( Custom Invoice and Order Number ) extension

 
Magento Community Magento Community
Magento Community
Magento Community
 
gIGoN
Jr. Member
 
Total Posts:  30
Joined:  2012-07-17
 

i’ve tried changint the value increment_last_id in eav_entity_store table from 100000003 to 800000003, however when i created a new order, it changes to 1800000004. There’s a ‘1’ at the front. What determines this? How can i not have 1 at the front of the number.

What i want to do is that i want order # to start with 8, invoice starts with 7, shipping starts with 3..and so you get the idea, i would like to have a different number to start with for each items.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Extendware
Sr. Member
 
Avatar
Total Posts:  231
Joined:  2011-08-04
 
gIGoN - 26 July 2012 06:37 PM

i’ve tried changint the value increment_last_id in eav_entity_store table from 100000003 to 800000003, however when i created a new order, it changes to 1800000004. There’s a ‘1’ at the front. What determines this? How can i not have 1 at the front of the number.

What i want to do is that i want order # to start with 8, invoice starts with 7, shipping starts with 3..and so you get the idea, i would like to have a different number to start with for each items.

You can do this with [url="http://www.extendware.com/custom-order-numbers-magento-extension.html"]Custom Order Numbers for Magento[/url’]. Even better for most people is to include the date in the order number. This way no one can guess your store’s turn over.

 
Magento Community Magento Community
Magento Community
Magento Community
 
FOOMAN
Guru
 
Avatar
Total Posts:  669
Joined:  2007-12-13
Auckland, New Zealand
 

Fooman Order Number Customiser is a new extension which allows you to fully customise order, invoice, shipment and credit memo numbers using any combination of letters, numbers and dates. You can also choose to assign individual settings for each store.

The extension is fully unit tested, with easy licensing and unencrypted source code.

For more information, demo store and reviews, see http://store.fooman.co.nz/magento-extension-order-number-customiser.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
ccondrup
Jr. Member
 
Total Posts:  23
Joined:  2010-02-10
Oslo
 

I have compiled a few simple sql scripts for those of you who don’t wanna install extensions for simple tasks like resetting data before launch. These scripts have worked well for me on Mage CE 1.6.2 to simply reset test data and to get rid of those unwieldy order IDs which have too many zeroes in a row.

I put the scripts up on Github now in hope that some will have use for them and some will help improve them.
Repo: https://github.com/ccondrup/mage-reset

 
Magento Community Magento Community
Magento Community
Magento Community
 
SaveTheMage
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2013-05-02
Montreal
 

There is a free magento extension that I built to change invoice and order numbers. This allows you to customize them to any number.

Custom Invoice and Order Numbers

Image Attachments
custom-order-invoice-numbers_1.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

Hi!
There is an extension to change magento order numbers - Custom Order Number

It allows to:
- Set any starting numbers for all document types
- Specify increment intervals and numbers length
- Use prefixes and date postfixes for numbers
- Mask important data to protect your business
- Adjust numbers to your local legislation

For more details, user guide and live demo please follow the link http://amasty.com/custom-order-number.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
janvonquaeldich
Jr. Member
 
Avatar
Total Posts:  1
Joined:  2013-11-11
 

As a 6 year late answer to Magentourist I would like to share my solution. In this code snippet

Magentourist - 27 October 2008 03:51 AM

The config.xml

<?xml version="1.0"?>
<config>
    <
modules>
        <
MyModule_ConsecutiveNumbering>   
            <
version>0.1.0</version>
        </
MyModule_ConsecutiveNumbering>
    </
modules>
    <global>       
        <
models>
            <
consecutivenumbering>
                <class>
MyModule_ConsecutiveNumbering_Model</class>               
            </
consecutivenumbering>
            <
eav>
                <
rewrite>
                    <
entity_increment>MyModule_ConsecutiveNumbering_Model_Entity_Increment_Numeric</entity_increment>
                </
rewrite>
            </
eav
        </
models>       
    </global>   
</
config>

only the rewrite is wrong. It must be entity_increment_numeric instead of entity_increment.

Here my config.xml to be placed at
app/code/core/local/Company/Module/etc/config.xml

<?xml version="1.0"?>
<config>
    <
modules>
        <!-- 
/* Defines Module and Version */ -->
        <
Company_Module>
            <
version>0.0.1</version>
        </
Company_Module>
    </
modules>

    <global>       
        <
models>
            <!-- 
/* Defines the Model */ -->
            <
Module>
                <class>
Company_Module_Model</class>               
            </
Module>
            <
eav
                <
rewrite
                    <
entity_increment_numeric>Company_Module_Model_Entity_Increment_Numeric</entity_increment_numeric>
                </
rewrite>
            </
eav>
        </
models>        
    </global>
</
config>

and the corresponding class for overriding Mage_Eav_Model_Entity_Increment_Numeric to be placed at
app/code/core/local/Company/Module/Model/Entity/Increment/Numeric.php

class Company_Module_Model_Entity_Increment_Numeric extends Mage_Eav_Model_Entity_Increment_Numeric
{

    
public function getNextId()
    
{
        
// found here: http://blog.chapagain.com.np/magento-how-to-get-attribute-name-and-value/
        
$invoice_id Mage::getModel('eav/config')->getEntityType('invoice')->getEntityTypeId ();
        
$creditmemo_id Mage::getModel('eav/config')->getEntityType('creditmemo')->getEntityTypeId ();
        
        
$requested_id $this->getData('entity_type_id');
        switch (
$requested_id{
            
case $invoice_id:
                
$ret $this->magicCalculation ('invoice');
                return 
$ret;
                break;
            case 
$creditmemo_id:
                
$ret $this->magicCalculation ('creditmemo');
                return 
$ret;
                break;
            default:
                return 
parent::getNextId ();
                break;
        
}
    }
}

For me, the available extensions did not suffice as I had to fetch the invoice and creditmemo numbers from an external source.

Don’t Forget to place the modules-xml in app/etc/modules/Company_Module.xml and clear the cache.

Hope that helps someone. Credits to ASchroder as I found the correct rewrite in his free extension
http://www.magentocommerce.com/magento-connect/aschroder-set-custom-order-number.html

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 7 of 7