1

I'm looking for the most up to date and most recommended way to update increment_pad_length I've seen many posts about direct with sql statements and other with di.xml eg:

<?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%'.02d%s</argument>
            </arguments>
        </type>
    </config>

UPDATE eav_entity_type SET increment_pad_length = 2 WHERE entity_type_id =5;

is any of the above solution in your view a good solution and will any of this be reverted if when the Magento version get updated, also is there any other solution to this as future prof ?

1 Answer 1

0

For me, only the di.xml approach worked when testing it. Setting increment_pad_length in the database didn't have any effect. Maybe it was different in earlier versions of Magento 2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.