coffeeian Posted June 10, 2008 Share Posted June 10, 2008 I wish to change the formatting of the date to reflect the system we are used to in the UK, specifically on the PDF invoice (and also anywhere else). How can this be done??? Link to comment Share on other sites More sharing options...
studionet Posted July 11, 2008 Share Posted July 11, 2008 I have the same problem. How to do this ? Link to comment Share on other sites More sharing options...
beate Posted July 11, 2008 Share Posted July 11, 2008 file /classes/Tools.php, about line 252. Link to comment Share on other sites More sharing options...
deborahjb Posted December 15, 2008 Share Posted December 15, 2008 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 More sharing options...
nslavic Posted December 18, 2008 Share Posted December 18, 2008 Yes, but changing order in /classes/Tools.phpwill affect date format in certain modules only, not in entire site (shop).For example, it will not effect date format for "Order details". Link to comment Share on other sites More sharing options...
tongfaafaasai Posted December 18, 2008 Share Posted December 18, 2008 hii 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 More sharing options...
TropischBruin Posted December 19, 2008 Share Posted December 19, 2008 hii 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 More sharing options...
tongfaafaasai Posted December 19, 2008 Share Posted December 19, 2008 hi TropischBruin,initially i didn't. however, i've just done it and i can see the UK date format displaying correctly. Link to comment Share on other sites More sharing options...
Dave Egerton Posted December 19, 2008 Share Posted December 19, 2008 what happens when you do an update, will tools.php be overwritten and you have to re-install your file? Link to comment Share on other sites More sharing options...
TropischBruin Posted December 19, 2008 Share Posted December 19, 2008 hi TropischBruin,initially i didn't. however, i've just done it and i can see the UK date format displaying correctly. Good, problem solved! ;-) Link to comment Share on other sites More sharing options...
TropischBruin Posted December 19, 2008 Share Posted December 19, 2008 what happens when you do an update, will tools.php be overwritten and you have to re-install your file? Yep! Link to comment Share on other sites More sharing options...
TropischBruin Posted December 19, 2008 Share Posted December 19, 2008 hii 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 More sharing options...
Juhy Posted June 10, 2009 Share Posted June 10, 2009 Hi to all profesionals and beginners.how to change date format in back office in Catalor -> New Product -> (reduction_from and reduction_to) in "01.01.2009" formatTHX for help!B.G. Link to comment Share on other sites More sharing options...
arowana Posted June 22, 2009 Share Posted June 22, 2009 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 fileI 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now