0

I want to append the shipping address country code as a prefix in my Order Id. For example, my order Id is 20191107 and My shipping country is the United state. So, my order id will be US20191107. I am totally new to Magento 2. Can you let me know how can I achieve this feature with a detail explanation?

Thanks

  • You can set order prefix and suffix which is also recommended by magento. In order to achieve your task you can write an observer which trigger after place order sales_order_place_after or checkout_onepage_success you can get and set increment id and save order but this also effect your admin order sorting which is by default set using increment id. Thank you – Ranjeet Kumar Oct 7 at 16:40
  • this will help you: mageplaza.com/kb/… – Jimit Bhavsar Oct 11 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.