En som kan hjælpe med oversættelse af dette.
This order total allows to add a fee to the order total according to the payment method choosen, and this fee will be shown on the
payment page (important for the customer to see how much he will be charged before choosing). Works fine with COD for example.
A Tax class for this fee can also be defined.
This order_total module has been taken out of contribution 2207 (payment module called contremb, which is the COD but in french)
Why? Because I found the order_total module extremely useful, and it is working with all payment modules, not only the "contremb".
I also translated the module to english (version francaise existe en commentaire dans le module).
All credits to the original author, I have only copy some files and fix it to work with tax classes and Credit Class.
Rigadin (rigadin@osc-help.net)
History:
--------
Original module:
# ------------------------------------------
#
# Written by Edwin Bekaert
# edwin@ednique.com
# adapted by xaglo
# Copyright (C) 2004 Edwin Bekaert & xaglo
#
# Relesed under the GPL license
# ------------------------------------------
29.03.2005 by Rigadin (rigadin@osc-help.net):
- Module ot_fixed_payment_chg.php updated to take tax class according to country and zone of delivery.
Unused function removed from module
- Use of "include_once" instead of "require" in the modifications of payment.php class, to avoid an error when using
Credit Class & Gift Voucher contribution [207].
Be informed when this contribution is updated:
http://www.osc-help.net
INSTALLATION:
1) Copy the ot_fixed_payment_chg.php order total module to your shop, at the same location. Do same with the language files.
2) If you have a clean osCommerce 2.2 MS2, you can copy the all the files over the original ones.
3) As you probably don't have a clean osC, here are the modifications to do in 2 files (clean files with only this contribution installed are also provided,
it can be faster to use a comparison program to update your shop):
# go to catalog/includes/classes/payment.php
# REPLACE the function selection() around line 125 with the one below: (or ADD the //added for ot_fixed_payment_chg" lines)
function selection() {
$selection_array = array();
include_once (DIR_WS_MODULES.'order_total/ot_fixed_payment_chg.php'); // added for ot_fixed_payment_chg
$pay_chg = new ot_fixed_payment_chg; // added for ot_fixed_payment_chg
if (is_array($this->modules)) {
reset($this->modules);
while (list(, $value) = each($this->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled) {
$selection = $GLOBALS[$class]->selection();
$selection['cost'] = $pay_chg->get_payment_cost($class); // added for ot_fixed_payment_chg
if (is_array($selection)) $selection_array[] = $selection;
}
}
}
return $selection_array;
}
# go to catalog/checkout_payment.php
# find this line (around 257)
<td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>
# REPLACE with:
<td class="main" colspan="3"><b>
<?php
echo $selection[$i]['module'];
if ($selection[$i]['cost']){
echo ' ('.$currencies->format($selection[$i]['cost']).')';
}
?></b></td>
# CAUTION:
# If the taxes aren't calculated as it should...
# when you selected show prices with VAT, the price should include the VAT
# When you don't select it, the price should be without VAT
# do this:
# (their should be 2 occurences now)
# FIND
if (DISPLAY_PRICE_WITH_TAX=="true") {
# REPLACE with
if (DISPLAY_PRICE_WITH_TAX) {