-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
The increment_prefix in eav_entity_store table doesn't seem to be getting applied to order numbers. Here's the steps I'm taking to reproduce on a clean install:
Installed Magento via composer's metapackage. Made sure that I was logged in as the filesystem owner and ran the following setup via cli:
bin/magento setup:install --base-url=http://localhost/ --db-host=localhost --db-name=magento --db-user=magento --db-password=magento123 --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1 --sales-order-increment-prefix=3 --cleanup-database
The installation script generates the following entry in eav_entity_store:
entity_store_id : 1, entity_type_id : 5, store_id : 1, increment_prefix : 3, increment_last_id : NULL
I set up cron to make sure indexers were running. I create a test product followed after by an order via the admin. I create the customer from the order entry screen. Upon saving the order, the sales order number was "000000001". It failed to pick up the prefix.
In a second attempt, I reindexed and flushed the cache. I created a second order and unfortunately it generates an order with "000000002".
I double checked the eav_entity_type table and order is listed with an entity_type_id of 5 which matches that in eav_entity_store. I also attempted to set the increment_last_id in eav_entity_store, reindex/flushed, and still nothing.
I've been working on clean installs for this issue since I have a site in production that I've been unable to update the increment_last_id for orders on no matter what I do. Has anyone been able to update the order numbers? I figured I'd try doing a simple prefix on a clean install to see if I could narrow down the problem.