Product Name in Order Details Page
-
Greetings,
Product name in the order details page not displaying with respect to the locale selected by the customer. Product name showing only in English.
packages\Webkul\Shop\src\Http\Controllers\OrderController.php $order = $this->order->findOneWhere([ 'customer_id' => auth()->guard('customer')->user()->id, 'id' => $id ]);
Please suggest.
-
Hi @maheshb,
Product name must be in selected locale language.
like if you select Arabic as locale then product name must be in
arabic e.g., product-name - اسم المنتج -
Hello,
Thank you for quick response. If I understand correctly - if customer has placed his order through Arabic language then he won't be able to view his ordered product name in English language if accidentally/willingly he has change his language?
We have product added for both the locales. We are assuming that product name should be visible irrespective of the locale selected and the locale selected while placing the order.
Right now if we are placing the order using one locale, product name in the order details page isn't visible in another locale.
Please suggest
-
Hi, @maheshb,
I understand you question, If you want to show product name as per as selected locale in shop(front-end) then you must have to save all product name in all the locale(locales which you want to use in shop), If you visited
admin->catalog->add product
in the top of you see that and please save the product details as per as selected locale then, you visited in shop if you select Arabic locale then product details shown in Arabic locale.Thanks
-
Hello Shivam,
Thank you for your response. Apologize if there is any confusion from my end. Please follow the steps for reproducing the issue -
- Created a product with the name Sample Product for both the locales i.e. English and Arabic as you have described above.
- Logged in as a customer.
- Placed order of Sample Product and my selected locale was English
- Goto User profile > orders
- Clicked on View Order link
- In the order details grid, Product name is shown in the English and this is correct.
- But if I changed locale to Arabic, the product name is not available in Arabic i.e. showing in English
Hope this clarifies the scenario
-
Hi @maheshb
Product name will be appear according to order locale not according to change in locale.
Thanks