Jump to content

Need to change date format in admin -> orders (from m/d/y to d/m/y)


AlexOrzelow

Recommended Posts

Hello! I need to change date format in orders page admin, from 09/07/2023 to 07/09/2023 (09 is month, 07 is day).
I've tried to change it from International -> Localization -> Languages .

Nothing changed so I think might be from other place?

m/d/y TO d/m/y 

Anyone could help me?

orders.png

Link to comment
Share on other sites

Hello Alex,

Maybe you did not change the date format of your current language.

Open Localization > Languages page. Select the current language of your back office: https://prnt.sc/_EwLEykbesap

Change the Date format and Date format (full) fields to d/m/Y and d/m/Y H:i:s respectively. Save your changes. https://prnt.sc/a0TNjik9rPZM

Hope this will help.

Best regards.

Link to comment
Share on other sites

  • 3 weeks later...

Problem solved. If anyone need to know how to change it, there are 2 files:
The first one: /src/PrestaShopBundle/Resources/views/Admin/TwigTemplateForm/bootstrap_4_layout.html.twig , at line 341 (in my case) search for "data-format" and after equals change it to "DD/MM/YYYY". 

I forgot to mention that I use the orders manager module. So if anyone uses it, you also must change here.
The second file : /modules/ets_ordermanager/ets_ordermanager.php  somewhere starting at 871 line, you must look for "'field' => 'date_add'," after you will see 'format' => then add 'd/m/Y H:i:s' 

date-format1.png

date-format2.png

  • Like 1
Link to comment
Share on other sites

  • 11 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...