warrenerjm Posted April 10, 2008 Share Posted April 10, 2008 Hi I have looked at the catalog/admin/invoice.php & I think this code relates to the .css of the company name address & telephone number that is printed on the customer invoices. <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', '204', '50'); ?></td> </tr> </table></td> </tr> I have looked at the .css pageHeading & amended it, but it still prints GREY. :huh: TD.pageHeading, DIV.pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 18px; font-weight: bold; color: #35459e; } Please can anyone tell me how tochange this? Thanks julie Link to comment Share on other sites More sharing options...
Mehlkraut Posted April 10, 2008 Share Posted April 10, 2008 I have the same problem. I wanted to change a color of a box so I replaced all the color codes which stood for that certain color and changed it into white but it didn't do anything. It's pretty frustrating. Link to comment Share on other sites More sharing options...
warrenerjm Posted April 10, 2008 Author Share Posted April 10, 2008 I have the same problem. I wanted to change a color of a box so I replaced all the color codes which stood for that certain color and changed it into white but it didn't do anything. It's pretty frustrating. I'm wondering if it is over-ridden somewhere else in this file or another? Hope someone can help us. :D Julie Link to comment Share on other sites More sharing options...
Mehlkraut Posted April 10, 2008 Share Posted April 10, 2008 Yeah that's what I thought aswell, but after looking for several hours I couldn't find anything. After that I thought: "Hey! Maybe the .css file isn't uploaded correctly" so I had a look at the .css file that was on the webserver to see if the changes were uploaded like they should. Everything was changed as it should so I still really do not have a clue what the real problem is. It's pretty frustrating, because it just doesn't seem logical; normally you change something in the .css and you upload it and you see the changes you've made. But now, that's hardly the case. I sure hope someone knows what to do. Good luck Julie! Joshua Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2008 Share Posted April 10, 2008 Yeah that's what I thought aswell, but after looking for several hours I couldn't find anything. After that I thought: "Hey! Maybe the .css file isn't uploaded correctly" so I had a look at the .css file that was on the webserver to see if the changes were uploaded like they should. Everything was changed as it should so I still really do not have a clue what the real problem is. It's pretty frustrating, because it just doesn't seem logical; normally you change something in the .css and you upload it and you see the changes you've made. But now, that's hardly the case. I sure hope someone knows what to do. Good luck Julie! Joshua right click on what is not changinging and see if they are images. Link to comment Share on other sites More sharing options...
warrenerjm Posted April 10, 2008 Author Share Posted April 10, 2008 right click on what is not changinging and see if they are images. Hi Leslie It is definately not a picture for me. When I go to view scource of the invoice it is using <td class="pageHeading"> which I assume relates to this part of the .css file? TD.pageHeading, DIV.pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 18px; font-weight: bold; color: #35459e; } The .css file shows the right colour but it just doesn't print or view in that colour. Thanks for your help. Julie Link to comment Share on other sites More sharing options...
Mehlkraut Posted April 10, 2008 Share Posted April 10, 2008 Yes, the same for me. Im not trying to adjust an img, it's really text, i've got the exact same problem as Julie has. Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2008 Share Posted April 10, 2008 Yes, the same for me. Im not trying to adjust an img, it's really text, i've got the exact same problem as Julie has. Do you mean the background? <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> Link to comment Share on other sites More sharing options...
Mehlkraut Posted April 10, 2008 Share Posted April 10, 2008 Thanks for you reply :) I meant the box on the left. Have a look: http://mondrian.entv.nl/test2/webwinkel/index.php Thanks, Joshua Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2008 Share Posted April 10, 2008 Thanks for you reply :) I meant the box on the left. Have a look: http://mondrian.entv.nl/test2/webwinkel/index.php Thanks, Joshua Hmm, I see a cell padding of 2 in the code. Link to comment Share on other sites More sharing options...
Mehlkraut Posted April 10, 2008 Share Posted April 10, 2008 I'm not worried about the cellpadding, I'm worried about the fact that I've changed the color of the text in the .css file, but it hasn't changed on the website. Link to comment Share on other sites More sharing options...
warrenerjm Posted April 10, 2008 Author Share Posted April 10, 2008 Not sure if I'm following this, as I posted about my invoice & not my index. :blink: I guess you do have a slightly different problem to me. All other .css changes do work on the website to me. Oh well guess I'm still stuck. :( Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2008 Share Posted April 10, 2008 Not sure if I'm following this, as I posted about my invoice & not my index. :blink: I guess you do have a slightly different problem to me. All other .css changes do work on the website to me. Oh well guess I'm still stuck. :( catalog/admin/invoice.php Do you mean the background? <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> I don't follow the rest, not the same problem, not even sure what text is now being referred to by Mehlkraut. Link to comment Share on other sites More sharing options...
warrenerjm Posted April 10, 2008 Author Share Posted April 10, 2008 catalog/admin/invoice.php Do you mean the background? <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> I don't follow the rest, not the same problem, not even sure what text is now being referred to by Mehlkraut. :blush: Sorry your post was quoting Mehlkraut. No The company address & telephone number that you add in admin & is printed in the top left hand corner of the invoice stubbonly remains grey even though my .css states #35459e for that class. I have the default invoice (ie osc logo in top right corner) The same colour appears in the column headers Products, Product Code, Price (ex VAT), etc if that helps exlain? Thanks for your patience. :rolleyes: julie Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2008 Share Posted April 10, 2008 :blush: Sorry your post was quoting Mehlkraut. No The company address & telephone number that you add in admin & is printed in the top left hand corner of the invoice stubbonly remains grey even though my .css states #35459e for that class. I have the default invoice (ie osc logo in top right corner) The same colour appears in the column headers Products, Product Code, Price (ex VAT), etc if that helps exlain? Thanks for your patience. :rolleyes: julie You are changing the stylesheet located in admin/includes right? The default osc setting in there should be body { background-color: #ffffff; color: #996633; margin: 0px; } .pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #996633; font-weight: bold; } .main { font-family: Verdana, Arial, sans-serif; font-size: 12px; } Those are the ones you want to look at Link to comment Share on other sites More sharing options...
warrenerjm Posted April 10, 2008 Author Share Posted April 10, 2008 You are changing the stylesheet located in admin/includes right?The default osc setting in there should be body { background-color: #ffffff; color: #996633; margin: 0px; } .pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #996633; font-weight: bold; } .main { font-family: Verdana, Arial, sans-serif; font-size: 12px; } Those are the ones you want to look at :blush: OK Now I feel silly!! :blush: Doh I didn't know about that one. :lol: Can you help me with ONE other thing on my invoice (if possible please?) I am trying to get the purchased date to appear. Payment Method: NoChex - Credit & Debit Cards Order #9999 Invoice Date: BLANK I am probably amending the wrong file here too! :blush: This is my admin/invoice.php <?php /* $Id: invoice.php,v 1.6 2003/06/20 00:37:30 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); include(DIR_WS_CLASSES . 'order.php'); $order = new order($oID); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', '204', '50'); ?></td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2"><?php echo tep_draw_separator(); ?></td> </tr> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_SOLD_TO; ?></b></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td class="main"><?php echo $order->customer['telephone']; ?></td> </tr> <tr> <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_SHIP_TO; ?></b></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td> <td class="dataTableHeadingContent" align="right"><?php //echo TABLE_HEADING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php //echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php //echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td> </tr> <?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name']; if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')'; echo '</i></small></nobr>'; } } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n"; echo ' <td class="dataTableContent" align="right" valign="top">' . //tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . //$currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . //$currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n"; echo ' </tr>' . "\n"; } ?> <tr> <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2"> <?php for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { echo ' <tr>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> </table></td> </tr> </table> <!-- body_text_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> I haven't amended any other file, but do I? Thank you so much. Off to amend the RIGHT .css. :lol: Julie Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2008 Share Posted April 10, 2008 :blush: OK Now I feel silly!! :blush: Doh I didn't know about that one. :lol: Can you help me with ONE other thing on my invoice (if possible please?) I am trying to get the purchased date to appear. Payment Method: NoChex - Credit & Debit Cards Order #9999 Invoice Date: BLANK Try this, but be sure to back up your file firs In admin/invoice.php find around line 80 <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> Change to <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_DATE; ?></b></td> <td class="main"><?php echo tep_datetime_short($order->info['date_purchased']); ?></td> </tr> In admin/includes/languages/english/invoice.php add right before the closing ?> tag define('ENTRY_PAYMENT_DATE', 'Invoice Date:'); Give that a try and let me know if that works or not. Link to comment Share on other sites More sharing options...
warrenerjm Posted April 10, 2008 Author Share Posted April 10, 2008 Try this, but be sure to back up your file firsIn admin/invoice.php find around line 80 <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> Change to <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_DATE; ?></b></td> <td class="main"><?php echo tep_datetime_short($order->info['date_purchased']); ?></td> </tr> In admin/includes/languages/english/invoice.php add right before the closing ?> tag define('ENTRY_PAYMENT_DATE', 'Invoice Date:'); Give that a try and let me know if that works or not. :thumbsup: Thanks Brian. :lol: I now have this: Payment Method: NoChex - Credit & Debit Cards Order #9999 Invoice Date: 04/10/2008 16:20:24 Except there is a bigger gap between the : & date than is showing here. Do you know how I may reduce this gap (there are no nbsp; in there) & remove time if possible please? Have I done the order number right as I haven't used the language file & I'm feeling I should have. :huh: <tr> <td class="main"><b>Order #</b><?php echo $oID;?> </td> </tr> Many thanks Julie Link to comment Share on other sites More sharing options...
minionsweb Posted April 10, 2008 Share Posted April 10, 2008 Hi I have looked at the catalog/admin/invoice.php & I think this code relates to the .css of the company name address & telephone number that is printed on the customer invoices. <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', '204', '50'); ?></td> </tr> </table></td> </tr> I have looked at the .css pageHeading & amended it, but it still prints GREY. :huh: TD.pageHeading, DIV.pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 18px; font-weight: bold; color: #35459e; } Please can anyone tell me how tochange this? Thanks julie Have you made a css print/text define? Have you edited the correct css file? That reminds me, I have to correct my print css for invoices/packing slips..... Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2008 Share Posted April 10, 2008 :thumbsup: Thanks Brian. :lol: I now have this: Payment Method: NoChex - Credit & Debit Cards Order #9999 Invoice Date: 04/10/2008 16:20:24 Except there is a bigger gap between the : & date than is showing here. Do you know how I may reduce this gap (there are no nbsp; in there) & remove time if possible please? Have I done the order number right as I haven't used the language file & I'm feeling I should have. :huh: <tr> <td class="main"><b>Order #</b><?php echo $oID;?> </td> </tr> Many thanks Julie The gap is caused by the table cells. Payment Method is longer tex than Invoice Date. If notice the method and date start at the samw place. To shorten the date change <td class="main"><?php echo tep_datetime_short($order->info['date_purchased']); ?></td> To <td class="main"><?php echo tep_date_short($order->info['date_purchased']); ?></td> As far as using the $oID for the order number, I think that should be ok. Yes I would use a define for Order #: in admin/includes/languages/english/invoice.php. That way you are not searching around here there and everywhere else for what you did. Link to comment Share on other sites More sharing options...
minionsweb Posted April 10, 2008 Share Posted April 10, 2008 Hi I have looked at the catalog/admin/invoice.php & I think this code relates to the .css of the company name address & telephone number that is printed on the customer invoices. <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', '204', '50'); ?></td> </tr> </table></td> </tr> I have looked at the .css pageHeading & amended it, but it still prints GREY. :huh: TD.pageHeading, DIV.pageHeading { font-family: Verdana, Arial, sans-serif; font-size: 18px; font-weight: bold; color: #35459e; } Please can anyone tell me how tochange this? Thanks julie Have you made a css print/text define? Have you edited the correct css file? That reminds me, I have to correct my print css for invoices/packing slips..... You have 2 stylesheets, and for printing you will want a 3rd possibly a 4th. one is in admin\includes\stylesheet.css the other is on the root of your catalog (store) for printing you will add a third, call it print.css Then in the files you need to reference for printing, you will duplicate the classes in the original sheet(s) Next change the colors to black and white or kill the white entirely Add this line under: <link rel="stylesheet" type="text/css" href="includes/print.css" media="print" > this line <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> and <link rel="stylesheet" type="text/css" href="print.css" media="print" > this line <link rel="stylesheet" type="text/css" href="stylesheet.css"> Be sure to save the css to your store and save the amended files. with the stylsheet calls you added the print.css call to. That will be 1 dollar! Link to comment Share on other sites More sharing options...
warrenerjm Posted April 10, 2008 Author Share Posted April 10, 2008 :thumbsup: Thanks Brian. :lol: I now have this: Payment Method: NoChex - Credit & Debit Cards Order #9999 Invoice Date: 04/10/2008 16:20:24 Except there is a bigger gap between the : & date than is showing here. Do you know how I may reduce this gap (there are no nbsp; in there) & remove time if possible please? Have I done the order number right as I haven't used the language file & I'm feeling I should have. :huh: <tr> <td class="main"><b>Order #</b><?php echo $oID;?> </td> </tr> Many thanks Julie Hi again I have been playing & made the order number code the same as your date code. :thumbsup: I haven't been as successful at making the date UK ie d/m/y & removing the time. I did read that the date format could be changed by amending the admin/includes/languages/english.php but it didn't work, so I probably have that wrong. admin .css now works too. :D so it's just the date & time if i don't find it two minutes after I have posted this (usual). Thanks julie Link to comment Share on other sites More sharing options...
warrenerjm Posted April 10, 2008 Author Share Posted April 10, 2008 Have you made a css print/text define?Have you edited the correct css file? That reminds me, I have to correct my print css for invoices/packing slips..... You have 2 stylesheets, and for printing you will want a 3rd possibly a 4th. one is in admin\includes\stylesheet.css the other is on the root of your catalog (store) for printing you will add a third, call it print.css Then in the files you need to reference for printing, you will duplicate the classes in the original sheet(s) Next change the colors to black and white or kill the white entirely Add this line under: <link rel="stylesheet" type="text/css" href="includes/print.css" media="print" > this line <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> and <link rel="stylesheet" type="text/css" href="print.css" media="print" > this line <link rel="stylesheet" type="text/css" href="stylesheet.css"> Be sure to save the css to your store and save the amended files. with the stylsheet calls you added the print.css call to. That will be 1 dollar! Hi Corey Sorry didn't see your post before I posted. Worth more than 1 dollar but confusing me now :lol: My printing is working OK with the two .css files that I have by default. Still learning as I go but didn't know you could have more .css files. I don't want to get too complicated with the design of the invoice as the default is nearly good enough apart from my few amendments already mentioned. If you talk in dollars you wouldn't be worried about the "wrong" date format would you. :-" Thanks for your time & I'll delve deeper into .css at a later date probably. Julie Link to comment Share on other sites More sharing options...
Guest Posted April 10, 2008 Share Posted April 10, 2008 Hi again I have been playing & made the order number code the same as your date code. :thumbsup: I haven't been as successful at making the date UK ie d/m/y & removing the time. I did read that the date format could be changed by amending the admin/includes/languages/english.php but it didn't work, so I probably have that wrong. admin .css now works too. :D so it's just the date & time if i don't find it two minutes after I have posted this (usual). Thanks julie There are a couple of ways to get date format you want(d/m/y). As always back up your files firs. In admin/includes/languages/english.php find define('DATE_FORMAT', 'm/d/Y'); // this is used for date() Change to define('DATE_FORMAT', 'd/m/Y'); // this is used for date() I have no idea what else that will affect so the other way is to do it like this. In admin/includes/languages/english.php add below define('DATE_FORMAT', 'm/d/Y'); // this is used for date() this define('DATE_FORMAT_UK', 'd/m/Y'); // this is used for date() In admin/includes/functions/general.php find // Output a raw date string in the selected locale date format // $raw_date needs to be in this format: YYYY-MM-DD HH:MM:SS // NOTE: Includes a workaround for dates before 01/01/1970 that fail on windows servers function tep_date_short($raw_date) { if ( ($raw_date == '0000-00-00 00:00:00') || ($raw_date == '') ) return false; $year = substr($raw_date, 0, 4); $month = (int)substr($raw_date, 5, 2); $day = (int)substr($raw_date, 8, 2); $hour = (int)substr($raw_date, 11, 2); $minute = (int)substr($raw_date, 14, 2); $second = (int)substr($raw_date, 17, 2); if (@date('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year) { return date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, $year)); } else { return ereg_replace('2037' . '$', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037))); } } Just below that add // UK Date Format function tep_date_short_uk($raw_date) { if ( ($raw_date == '0000-00-00 00:00:00') || ($raw_date == '') ) return false; $year = substr($raw_date, 0, 4); $month = (int)substr($raw_date, 5, 2); $day = (int)substr($raw_date, 8, 2); $hour = (int)substr($raw_date, 11, 2); $minute = (int)substr($raw_date, 14, 2); $second = (int)substr($raw_date, 17, 2); if (@date('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year) { return date(DATE_FORMAT_UK, mktime($hour, $minute, $second, $month, $day, $year)); } else { return ereg_replace('2037' . '$', $year, date(DATE_FORMAT_UK, mktime($hour, $minute, $second, $month, $day, 2037))); } } // End UK Date Format In admin/invoice.php make sure the invoice date is like so <td class="main"><?php echo tep_date_shor_ukt($order->info['date_purchased']); ?></td> Still no charge :lol: Link to comment Share on other sites More sharing options...
warrenerjm Posted April 11, 2008 Author Share Posted April 11, 2008 Hi Brian Sorry but I am not getting my email notifications & missed your post? :huh: I'll do now. SPAM set too high I guess, although some are getting through? Strange. Feel silly again. :blush: Thanks Julie Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.