Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

editing invoice.php


pete2007

Recommended Posts

I want to edit the invoice.php page.

 

First of all I would like to add text below all the order details, but when I add text underneith the code below, the text displays above the order details, does anyone know how I can achieve this?

 

Secondly it is possible to remove "Model" and "Tax" from the invoice?

 

Thank you in advance

 


<?php
/*
 $Id: invoice.php,v 1.1 2002/06/11 18:17:59 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('TABLE_HEADING_COMMENTS', 'Comments');
define('TABLE_HEADING_PRODUCTS_MODEL', 'Model');
define('TABLE_HEADING_PRODUCTS', 'Products');
define('TABLE_HEADING_TAX', 'Tax');
define('TABLE_HEADING_TOTAL', 'Total');
define('TABLE_HEADING_PRICE_EXCLUDING_TAX', 'Price (ex)');
define('TABLE_HEADING_PRICE_INCLUDING_TAX', 'Price (inc)');
define('TABLE_HEADING_TOTAL_EXCLUDING_TAX', 'Total (ex)');
define('TABLE_HEADING_TOTAL_INCLUDING_TAX', 'Total (inc)');

define('ENTRY_SOLD_TO', 'SOLD TO:');
define('ENTRY_SHIP_TO', 'SHIP TO:');
define('ENTRY_PAYMENT_METHOD', 'Payment Method:');
define('ENTRY_SUB_TOTAL', 'Sub-Total:');
define('ENTRY_TAX', 'Tax:');
define('ENTRY_SHIPPING', 'Shipping:');
define('ENTRY_TOTAL', 'Total:');
?>

Link to comment
Share on other sites

Peter,

 

 

That is the language definition file, you would need to make changes to the /admin/invoice.php file if you want to add/remove information to the invoice page.

 

 

 

Chris

Link to comment
Share on other sites

for:

 

 

 

in: /catalog/admin/invoice.php

 

FIND:

</table>
<!-- body_text_eof //-->
<br />
</body>

REPLACE:

</table>
<!-- body_text_eof //-->
<p class="main">Hello world!</p>
<br />
</body>

 

 

Ok, now that you have been shown the incorrect way to add the code, here is the correct way:

 

in the /admin/invoice.php file add something like this:

 

 

<tr>
		<td class="main"><?php echo YOUR_TEXT; ?></td>
	  </tr>
</table>
<!-- body_text_eof //-->
<br />
</body>

 

 

 

in the /admin/includes/languages/english/invoice.php add this:

 

 

define('YOUR_TEXT', 'Put your text in this area');

 

 

 

The example of coding Vince mentioned above is common but not correct.

 

 

 

Chris

Link to comment
Share on other sites

Peter,

 

Yes you can add HTML style tags within that language definition, example:

 

define('YOUR_TEXT', '<font style="font-size:10px" face="arial, helvetica" color="red">Put your text in this area</font>');

 

 

Chris

Link to comment
Share on other sites

define('YOUR_TEXT', '<font style="font-size:10px" face="arial, helvetica" color="red">Put your text in this area</font>');

 

Although I'd use a Div, Span, or P, or just throw the style in the TR (table row) that Chris suggests using, as Font is a deprecated tag.

 

http://www.w3schools.com/tags/tag_font.asp

A little knowledge of php goes a long way.

Link to comment
Share on other sites

Vince,

 

You are correct. It is a deprecated tag.BUT, it is still widely used throughout the osCommerce language definitions AND still supported by all current browsers.

 

 

 

 

Chris

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...