Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start with a different Customer ID in Magento?

Tags:

magento

In Magento Community v1.5.1.0, how would one go about setting the starting (or next) Customer ID? By default, the first Customer ID is 1. I need to start at Customer ID 300000 after clearing out test data before moving a store into production.

Order, Invoice, Shipment, and Credit Memo ID's can be changed by updating the appropriate values in the eav_entity_store, but (contrary to the information here) there is not an increment entry for Customer ID there.

I scanned the database for a "customer"-related table that would achieve the same thing as eav_entity_store but no dice, and my Google-Fu failed as well.

like image 607
Chad C. Davis Avatar asked Dec 09 '11 03:12

Chad C. Davis


People also ask

How do I set the default customer group in Magento 2?

We assign the registered customer to a customer group via the admin panel. In order to do so, click Customer->All Customers. Mark the checkbox in the first column after finding the customer that you want to assign. Click Actions and select Assign a Customer Group.

How can I get Magento customer ID?

Use the following code to load Customer by ID using Object Manager in your Magento store. $customerId=1; $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $customerData = $objectManager->create('Magento\Customer\Model\Customer')->load($customerId);

How can I get customer address ID in Magento 2?

You can get the customer address data by Address id using AddressRepositoryInterface interface. Magento\Customer\Api\AddressRepositoryInterface contains the getById($addressId) function with pass first argument as address id to fetch specific customer address data.


1 Answers

I thought it was not possible in magento, But it will done by MySql query. Run the below query manually and you will get the user id starts from 300001

ALTER TABLE customer_entity AUTO_INCREMENT = 300001;
like image 140
Sankar Subburaj Avatar answered Sep 27 '22 23:09

Sankar Subburaj