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
https://www.opencart.com/index.php?rout ... on_id=4504
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!
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!
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
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
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
---
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
---
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.
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
https://www.opencart.com/index.php?rout ... on_id=4504
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)
/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.Johnathan wrote: ↑Sun Jul 30, 2023 9:42 pmIf 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)
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.
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.
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:Johnathan wrote: ↑Mon Jul 31, 2023 9:50 pmDid 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.
/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 (38.92 KiB) Viewed 925 times
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:
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.
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.
Who is online
Users browsing this forum: No registered users and 67 guests