I am bit confused with order id and order increment id, So can any one help me to understand the difference between these two?
I have an observer for sales_order_place_after where I store sales details in a custom table.
But with
$orderId = $observer->getEvent()->getOrder()->getId();
I get the order ids as normal ids like 112 or 113 or 110 etc not like 20001201
So which is the real order id, 20001201 or 112?
I need to further process order data based on this order id, I use 112, 113 etc. and it works, but I need to clarify this.
Best Answer
The difference is:
You can easily load an order using the internal order_id:
PS: If you need it, you can easily get the increment ID from a loaded order: