Post by Maxidays » Wed Nov 13, 2019 2:58 am

Hi, on my opencart 2.1 all the date ( special, availability, reduction ) are in US
How to have in FR ( 12 Novembre 2019 )

Thanks
Michel

Active Member

Posts

Joined
Thu Oct 10, 2019 7:18 am

Post by Johnathan » Wed Nov 13, 2019 4:17 am

Date formats are set in the language files. You can find them right at the top of these files:

/admin/language/YOURLANGUAGE/YOURLANGUAGE.php
/catalog/language/YOURLANGUAGE/YOURLANGUAGE.php

For example:

/catalog/language/fr-fr/fr-fr.php

The date formats used are part of the PHP "date()" function, so you can read more about what the characters in that format mean here:

https://www.php.net/manual/en/function.date.php

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Maxidays » Wed Nov 13, 2019 4:47 am

Hi
on catalog/language/french/french.php

I have this

$_['date_format_short'] = 'd/m/Y';

but on product backoffice, the special is again in US ( november 2019 ) 2019-11-12

Thanks for your help

Michel

Active Member

Posts

Joined
Thu Oct 10, 2019 7:18 am

Post by thekrotek » Wed Nov 13, 2019 4:54 am

If you mean backend (admin), then the date format is hard-coded in templates. I wouldn't recommend changing it for you might get issues.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Johnathan » Wed Nov 13, 2019 4:56 am

I agree with thekrotek, any dates you enter in the admin panel (like the Special date format that you enter in the product data) are hard-coded that way, so you shouldn't change them. This format is pretty standard internationally:

YYYY-MM-DD

That date format won't show to your customer, so just make sure you follow it when entering Specials and you should be fine.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Maxidays » Wed Nov 13, 2019 5:10 am

I added the availibility product date on the latest module and it display YYYY-MM-DD, I would like display like MM-DD-YYYY or 12 Novembre 2019

see capture

Thanks

Attachments

Capture.PNG

Capture.PNG (53.5 KiB) Viewed 833 times


Active Member

Posts

Joined
Thu Oct 10, 2019 7:18 am

Post by Johnathan » Wed Nov 13, 2019 10:37 pm

I don't think those dates are a part of a standard OpenCart installation, so it may be something in your theme. You should look at the date format used in the front-end language file:

/catalog/language/YOURLANGUAGE/YOURLANGUAGE.php

If changing something in there doesn't fix it, it means it's hard-coded in your theme files. You should contact your theme developer for support.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by xxvirusxx » Wed Nov 13, 2019 11:18 pm

Because of this in tpl files...

Code: Select all

data-date-format="YYYY-MM-DD HH:mm"
Maybe in the future will be like this

Code: Select all

data-date-format="<?php echo $my_lang_date_format; ?>"

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Burt65 » Sun Nov 17, 2019 8:25 pm

Maxidays wrote:
Wed Nov 13, 2019 2:58 am
Hi, on my opencart 2.1 all the date ( special, availability, reduction ) are in US
How to have in FR ( 12 Novembre 2019 )

Thanks
Michel
Hi Maxidays

Was your issue resolved?

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz

Post by IP_CAM » Mon Nov 18, 2019 12:29 am

Well well well, what a surprise, back from OZ again ?! :D

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Burt65 » Mon Nov 18, 2019 1:46 pm

IP_CAM wrote:
Mon Nov 18, 2019 12:29 am
Well well well, what a surprise, back from OZ again ?! :D
Hey mate, I had to take care of few obstacles (health issues)... Nice to see you still alive and kicking... :)

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz

Post by Maxidays » Tue Nov 19, 2019 6:23 am

Thanks. Resolved

Active Member

Posts

Joined
Thu Oct 10, 2019 7:18 am

Post by Burt65 » Tue Nov 19, 2019 6:36 am

Maxidays wrote:
Tue Nov 19, 2019 6:23 am
Thanks. Resolved
Excellent.. I'll change the title to solved then..
Cheers

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz

Post by IP_CAM » Tue Nov 19, 2019 11:44 am

Nice to see you still alive and kicking..
Well, I probably still try, to fight reality, but it's getting harder, that's for sure.
Still, once in a while, I find some peanuts, to enable my Baby, to further stay
alive and well, and that's a very good reason, to stay, despite of, what's reality.
The only good one, at least for me, as I can think of momentarely .... ::)

But it's Business, plain Business, so, what the heck ?! :D
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 171 guests