Post by Concept211 » Mon Dec 05, 2016 5:41 pm

Hey guys. I went ahead and updated the vQmod for OpenCart v2+ support. Also added changes to the time display so it's the standard 2:00 PM instead of 14:00 military time.

https://www.opencart.com/index.php?rout ... on_id=4504

User avatar
New member

Posts

Joined
Fri Oct 14, 2011 1:40 am

Post by excecutive » Fri Feb 02, 2018 12:36 am

In my cart files I was able to update the date formatting catalog/language/english/english.php GREAT!
On the /admin/language/english/english.php There is no .php files in /admin/language/english/ only folders: localisation,module,payment,sale,shipping,tool
My address is not formatted correctly in the customer admin area. Please help!

Newbie

Posts

Joined
Thu Feb 01, 2018 2:01 am

Post by SherryM » Wed Jul 11, 2018 11:23 am

Hi
Can someone please help me how do I get this to work when someone leaves a review it shows as this 30/06/18 I would like for it to be month first than date than year. I have Open Cart 3.0 and have been looking around and cannot fine anything for the 3.0

New member

Posts

Joined
Thu Apr 19, 2018 3:26 am

Post by IP_CAM » Wed Jul 11, 2018 12:18 pm

Well, you could try this nice Translator Admin Tool, to easy change
such Values, even if only one language exists, and if/as long as such
Variable Values are placed in the Language File Sections.
Ernie ;)
---
Translate Mate free, OC v.2.0.0.0 - 3.0.2.0: (untested, I use it's older v.1.5.x Brother!)
https://www.opencart.com/index.php?rout ... n_id=23098
---
Image

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 KandC » Sun Jul 30, 2023 3:38 am

Has anyone been able to get the below extension to work with OpenCart 3.0.3.8?

https://www.opencart.com/index.php?rout ... on_id=4504

Active Member

Posts

Joined
Sun Jun 11, 2023 7:14 am

Post by Johnathan » Sun Jul 30, 2023 9:42 pm

If the vQmod isn't working, just manually change the format in the language files. For 3.0.3.8 that would be these:

/admin/language/en-gb/en-gb.php
/catalog/language/en-gb/en-gb.php

For a reference on the date formatting, see here:

https://www.php.net/manual/en/datetime.format.php

Don't forget to refresh your ocMod cache in Extensions > Modifications after doing that, and double-check that you're not already overriding those files using the Language Editor (in Design > Language Editor)

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by KandC » Mon Jul 31, 2023 7:35 am

Johnathan wrote:
Sun Jul 30, 2023 9:42 pm
If the vQmod isn't working, just manually change the format in the language files. For 3.0.3.8 that would be these:

/admin/language/en-gb/en-gb.php
/catalog/language/en-gb/en-gb.php

For a reference on the date formatting, see here:

https://www.php.net/manual/en/datetime.format.php

Don't forget to refresh your ocMod cache in Extensions > Modifications after doing that, and double-check that you're not already overriding those files using the Language Editor (in Design > Language Editor)
I updated the files manually and put the same changes into the Language editor. Everything is working except the Email to the customer for a completed order.
Why do you say not to override them in the Language Editor? I did that first and it only fixed the customer facing site. It does not fix the Admin. Again it still does not fix the email to the customers order.

Active Member

Posts

Joined
Sun Jun 11, 2023 7:14 am

Post by Johnathan » Mon Jul 31, 2023 9:50 pm

Did you update both the "date_format_short" and "date_format_long" variables? I believe the customer e-mail uses the former, but changing both should ensure that it gets updated. If it still doesn't, double-check whether you're using any mods that affect the order e-mail, since it could be ignoring those date formats.

You can certainly use the Language Editor if you want --- but you're correct that it will not fix the admin-side dates. Those will have to be modified in the actual language files, and I figure if you're having to do it in one file via FTP, you might as well do it in both. However, if you prefer using the Language Editor that's certainly an option.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by KandC » Tue Aug 01, 2023 3:43 am

Johnathan wrote:
Mon Jul 31, 2023 9:50 pm
Did you update both the "date_format_short" and "date_format_long" variables? I believe the customer e-mail uses the former, but changing both should ensure that it gets updated. If it still doesn't, double-check whether you're using any mods that affect the order e-mail, since it could be ignoring those date formats.

You can certainly use the Language Editor if you want --- but you're correct that it will not fix the admin-side dates. Those will have to be modified in the actual language files, and I figure if you're having to do it in one file via FTP, you might as well do it in both. However, if you prefer using the Language Editor that's certainly an option.
I updated the below files:
/catalog/language/en-gb/en-gb.php
/admin/language/en-gb/en-gb.php

Here is what I changed:

Change:
$_['date_format_short'] = 'd/m/Y'
to:
$_['date_format_short'] = 'm/d/Y'
Change:
$_['date_format_long'] = 'l dS F Y'
to:
$_['date_format_long'] = 'l, F j, Y'
Change:
$_['datetime_format'] = 'd/m/Y H:i:s'
to:
$_['datetime_format'] = 'm/d/Y g:i:s A

See attached the language editor changes I made. The email to the customer still shows Date Added: DD/MM/YYYY

I also tried to add a language editor for mail/Order_added but the date format is not control by that option.

Attachments

opencart_dates_Language_editor.JPG

opencart_dates_Language_editor.JPG (38.92 KiB) Viewed 925 times


Active Member

Posts

Joined
Sun Jun 11, 2023 7:14 am

Post by Johnathan » Tue Aug 01, 2023 10:26 pm

I just checked the files, and the code for the order e-mail uses the "date_format_short", which you can see in the /catalog/controller/mail/order.php file. This line is in the add() function and edit() function:

Code: Select all

$data['date_added'] = date($language->get('date_format_short'), strtotime($order_info['date_added']));

I also just placed a test order in a fresh 3.0.3.8 installation, and the order e-mail properly used the "date_format_short" syntax.

If that's not working in your installation, you most likely have a mod installed that is overriding the order e-mail, as I mentioned previously. You'll have to look through your mods and see what is modifying that. If you can't find it, you'll probably have to hire someone to look at your installation, since this isn't a problem in a default 3.0.3.8 installation.

If you need to find a developer, you can post a request in the OpenCart "Commercial Support" forum, which is checked by a number of OpenCart developers. You can also try checking out the OpenCart "Partners" area.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 67 guests