I try to short order number from 11 to 6.
In database I select table eav_entity_type
SELECT * FROM `eav_entity_type`
go to table "order" and looking for increment_pad_length
I found that I have to change the record increment_pad_lenght
But here I have value 8 (in magento order ID have 11 digitals).
I change this value to 4 and update magento
php bin/magento setup:upgrade
unfortunately I did not receive any result. Any one know how to do?
EDIT: after database query
select * from sales_sequence_meta;
I see table sequence_order_1, sequence_order_2, sequence_order_3 etc.
After edit for example sequence_order_1 I cannot see AUTO_INCREMENT record.
EDIT: After:
mysql: select * from sales_sequence_meta;
ALTER TABLE sequence_order_0 AUTO_INCREMENT=7895;
ALTER TABLE sequence_order_1 AUTO_INCREMENT=7895;
ALTER TABLE sequence_order_2 AUTO_INCREMENT=7895;
ALTER TABLE sequence_order_3 AUTO_INCREMENT=7895;
ALTER TABLE sequence_order_4 AUTO_INCREMENT=7895;
ALTER TABLE sequence_order_5 AUTO_INCREMENT=7895;
ALTER TABLE sequence_order_6 AUTO_INCREMENT=7895;
my order ID is still the same.
@Rakesh Varma, In file /vendor/magento/module-sales-sequence/Model/Sequence.php, on line 19 I have:
const DEFAULT_PATTERN = "%s%'.09d%s";
When I edit file: app/etc/di.xml and adding below line:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\DB\Sequence\SequenceInterface">
<arguments>
<argument name="pattern" xsi:type="string">%s%'.06d%s</argument>
</arguments>
</type>
</config>
Get error:
Fatal error: Uncaught Magento\Framework\Exception\LocalizedException: Invalid XML in file /home/brandswearxv/ftp/app/etc/di.xml: XML declaration allowed only at the start of the document Line: 1233 Extra content at the end of the document Line: 1234 in /home/brandswearxv/ftp/vendor/magento/framework/Config/Reader/Filesystem.php:151 Stack trace: #0 /home/brandswearxv/ftp/vendor/magento/framework/Config/Reader/Filesystem.php(127): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator)) #1 /home/brandswearxv/ftp/vendor/magento/framework/App/ObjectManagerFactory.php(282): Magento\Framework\Config\Reader\Filesystem->read('primary') #2 /home/brandswearxv/ftp/vendor/magento/framework/App/ObjectManagerFactory.php(142): Magento\Framework\App\ObjectManagerFactory->_loadPrimaryConfig(Object(Magento\Framework\App\Filesystem\DirectoryList), Object(Magento\Framework\Filesystem\DriverPool), Object(Magento\Framework\ObjectManager\Config\Mapper\Dom), 'developer') #3 /home/brandswearxv/ftp/ve in /home/brandswearxv/ftp/vendor/magento/framework/App/ObjectManagerFactory.php on line 284
00000001
to001
?