Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change color of text in orders.php


bigbob2

Recommended Posts

I have an ongoing issue of employees occasionally forgetting to use the shipping address from the customer orders page and instead they will cut and paste the customer address in to our invoicing software.  99% of the time this is the same anyway, but we have been caught out.  So my simple solution to this is that I want to change the font color on the customer address and the billing address to be a light grey, so it's visible if needed, but faint enough that nobody will use it.  Can someone please tell me how to modify the code in orders.php to make those two unwanted addresses #dadada color?

 

Thanks 

Link to comment
Share on other sites

in admin/orders.php change

<td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>

to

<td class="main" style="color:#dadada;"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>

to get the style you want.

osCommerce user since 2003! :thumbsup:

Link to comment
Share on other sites

Hi,

something that I did to orders.php is similar:

 <td class="main"><?php if ($order->delivery != $order->billing) {echo '<b> <font color="#FF0000">';}?><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?><?  if ($order->delivery != $order->billing) {echo '</b> </font>';}?></td>

which paints the address in bold red if it differs which is also helpful if you don't want it to be overlooked, e.g. some payment method which doesn't avoid unwanted differing addresses by itself.

 

Best regards

Christoph

Link to comment
Share on other sites

When changing text color like this, keep a few rules in mind:

  1. Be consistent -- use the same color scheme to mean the same thing everywhere, so your employees don't have to learn a half-dozen different conventions. Define a class, rather than hard coding a style into a tag.
  2. Try to adhere to standard UI design -- light gray means "disabled", red means "error", etc. "Disabled" might be appropriate for a "don't use this" address, but be careful, especially if you have any other uses of "disabled".
  3. Watch out for color vision-deficiency people trying to use this. Something like 10% of men and 1% of women have some degree of "color blindness", and you don't want them to misread text as meaning something different than what you intended, or being unable to see it at all! It may be a good idea to not use color changes alone, but also have some sort of notice like "Don't use this address".
Link to comment
Share on other sites

@@MrPhil

this was just a quick fix and you are right not elegant, for the edge version I'll try it a better way from:

         <fieldset style="border: 0; height: 100%;">
            <legend style="; font-weight: bold;"><?php echo ENTRY_SHIPPING_ADDRESS; ?></legend>

            <p><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></p>
          </fieldset>

to:

          <fieldset style="border: 0; height: 100%;"<?php if ($order->delivery != $order->billing) echo 'class="secWarning"'; ?> >
            <legend style="; font-weight: bold;"><?php echo ENTRY_SHIPPING_ADDRESS; ?></legend>

            <p><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></p>
          </fieldset>

Best regards

Christoph

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...