Magento 2: How to differentiate the app and web based orders?
-
12-03-2021 - |
Question
How to identify whether the order is placed from an app or website?
I want to add one custom column in admin sales order grid. And the column displays the values for order source(app or website order).
How to get the order is placed from web or app?
Thanks.
Solution
The app must call an API to place an order in this API add a param "requestPlatform" and pass the request platform value in it such as "android" or "ios", based on this parameter you can differentiate that the order is placed from which platform.
for e.g
{
"requestPlatform": "android"
}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange