Jump to content

Date Format


Recommended Posts

  • 1 month later...
  • 5 months later...

On the new 1.1.0.3--

Open >>tools.php, line 292

Change the numbers in the line below within the square brackets.

0=year; 1=month, 2=day

return ($tmpTab[1].'-'.$tmpTab[2].'-'.$tmpTab[0].($full ? $hour : ''));




So, the above will display as: Month, Day, Year. Swap out the numbers to suit your display order if different than above.

Link to comment
Share on other sites

hi

i have changed the code within classes\Tools.php to the following:

$language = Language::getLanguage(intval($id_lang));
        if ($language AND strtolower($language['iso_code']) == 'fr')
            return ($tmpTab[2].'-'.$tmpTab[1].'-'.$tmpTab[0].($full ? $hour : ''));
        else
            return ($tmpTab[2].'-'.$tmpTab[1].'-'.$tmpTab[0].($full ? $hour : ''));



and it seems my front end display UK date format correctly. however, in the back end, i found 1 page that didnt display UK date and that is when you click the "order" tab to see a list of orders

Link to comment
Share on other sites

hi

i have changed the code within classes\Tools.php to the following:

$language = Language::getLanguage(intval($id_lang));
        if ($language AND strtolower($language['iso_code']) == 'fr')
            return ($tmpTab[2].'-'.$tmpTab[1].'-'.$tmpTab[0].($full ? $hour : ''));
        else
            return ($tmpTab[2].'-'.$tmpTab[1].'-'.$tmpTab[0].($full ? $hour : ''));



and it seems my front end display UK date format correctly. however, in the back end, i found 1 page that didnt display UK date and that is when you click the "order" tab to see a list of orders



Did you create any new orders after inserting that new code?
Link to comment
Share on other sites

hi

i have changed the code within classes\Tools.php to the following:

$language = Language::getLanguage(intval($id_lang));
        if ($language AND strtolower($language['iso_code']) == 'fr')
            return ($tmpTab[2].'-'.$tmpTab[1].'-'.$tmpTab[0].($full ? $hour : ''));
        else
            return ($tmpTab[2].'-'.$tmpTab[1].'-'.$tmpTab[0].($full ? $hour : ''));



and it seems my front end display UK date format correctly. however, in the back end, i found 1 page that didnt display UK date and that is when you click the "order" tab to see a list of orders



btw. If you change the 'fr' in 'uk' and then the first line to the correct settings your problem is also solved.
Visitors from other countries (not UK) will get the else format = correct for the rest of Europe.

$language = Language::getLanguage(intval($id_lang));
        if ($language AND strtolower($language['iso_code']) == 'uk')
            return ($tmpTab[0].'-'.$tmpTab[1].'-'.$tmpTab[1].($full ? $hour : ''));
        else
            return ($tmpTab[2].'-'.$tmpTab[1].'-'.$tmpTab[0].($full ? $hour : ''));

Link to comment
Share on other sites

  • 5 months later...
  • 2 weeks later...

It seems I can't edit Tools.php, I did exactly what was described but keep having this error after clicking PDF Invoice file in Order:

FPDF error: Some data has already been output, can't send PDF file

I even tried editing the Tools.php just be adding a space in the /** comment area **/ and I still get the same error after replacing the Tool.php in server...

Anybody has encountered and solve this problem ?

Link to comment
Share on other sites

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...