Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order Total into usable Variable invoice.php


andrew.drayton

Recommended Posts

Hi all,

 

I am having a bit of trouble attempting to convert Order Total into a Variable to deduct PayPal merchant fees from it.

I require this as my client absorbs the merchant fee, they require this for paperwork. At the moment I am manually entering the total into the amount each time and producing the invoice.

 

Here is what I have at the moment and as you can see $Total has been manually entered. Any advice?

 

<?php
$Total = 203.50;

$Paypal = $Total * 0.024 + 0.30;
$NetTotal = $Total - $Paypal;

echo ' <tr>' . "\n".
	 ' <td align="right" class="smallText">' . 'Less Paypal:' . ' </td>' . "\n".
		 ' <td align="right" class="smallText">' . $currencies->format($Paypal) . '</td>' . "\n" .
	 ' </tr>' . "\n".
	 ' <tr>' . "\n".
	 ' ><td align="right" class="smallText">' . 'Net Payment:' . ' </td>' . "\n".
		 ' <td align="right" class="smallText">' . '<b>' . $currencies->format($NetTotal) . ' </b> ' . '</td>' . "\n" .
	 ' </tr>' . "\n".
	 ' <tr>' . "\n";
?>

Link to comment
Share on other sites

The variable already exists, im not sure where you want this to show i take it you do not want it visible to the customer?

If you look in admin / includes / modules / index / orders.php you can see the make up there also you could add your own code and then use this file as a seperate file just for your own purpose.

Hope this helps

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...