How to detect customer's language in order

rahulchd891
Tourist
8 0 3

Hi, 

My store has two locales - English and French. Once an order is made by a customer, we would like to find out whether the customer shopped in English or French, ideally somewhere in the order such as in the notes. I am not sure where to add the code "{% request.locale.name %}" as I cannot control the checkout. Normally, the locale would appear in the "Notes" of the order.

0 Likes
CandJ
Tourist
9 0 1

Hi there,

Did you happen to find out how to do this? We are also looking for this information.

Thank you so much in advance for your answer!

0 Likes
rahulchd891
Tourist
8 0 3

Hi, 

I haven't found a direct result. However, what I ended up doing is adding the Shopify code {{ request.locale.name }} next to the cart note code within the template "cart". This is shown below. So in the front end, the customer will see the language name in their cart note (which they can delete), and that note I can access in the order notes.

{{request.locale.name }} {{ cart.note }}

 

0 Likes
CandJ
Tourist
9 0 1
Thank you for letting us know!
0 Likes