how incrementId generated, how it relates to orderId
what is the best scenario to use both and why?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
loadByIncrementId() is a method that loads an order, given an "increment id".
This is the human friendly order number that is displayed to the customer (like "100000001") and is generated based on certain rules (default: store id + 0-padding + consecutive number)
The "order id" on the other hand is the internal primary key (auto increment) of the
sales_flat_order database and is used in database and code to uniquely identify orders.