0

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.

1 Answer 1

2

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"
}
4
  • For website orders?
    – Mahi M
    Sep 5, 2019 at 5:00
  • for website you are not getting this parameter because it is for the API, and if the API call through an app you can check it otherwise the order is placed from web
    – ASQ
    Sep 5, 2019 at 5:02
  • I am also using this scenario for my store
    – ASQ
    Sep 5, 2019 at 5:03
  • @ASQ so mean you need to custom V1/carts/mine/payment-informationc or create new API? Can you please give more detail, bcoz from my opinion we can use the event 'checkout_onepage_controller_success_action' for success case and override Magento\Checkout\Controller\Onepage\Failure for fail case
    – Junior
    May 15, 2022 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.