I want to add a prefix to sales order id. I install magento using "--sales-order-increment-prefix" as below:

php bin/magento setup:install --base-url=http://local.magento.com/ \
--db-host= --db-name=db1 --db-user=root --db-password=123456 \
--admin-firstname=Admin --admin-lastname=Admin --admin-email=abc@gmail.com \
--admin-user=admin --admin-password=1qaz2wsx --language=en_US \
--currency=HKD --timezone=Asia/Hong_Kong --use-rewrites=1 --backend-frontname=admin \

However, it is not working. And it results that the invoice id is always duplicated at PayPal side. Can anyone help?

Note: My Magento version is 2.0.8.


I had the same issue. Modifying the sales_sequence_profile table worked for me in Magento 2.1.1.

#mysql - I'm changing prefix for everything here - add where condition if you only want to update order prefix
update sales_sequence_profile set prefix = 6

# Magento command line
bin/magento cache:flush
bin/magento indexer:reindex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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