Contributions
Payment Type Charge
order total class that lets you set a percentage based charge depending on the payment type the customer uses.
Expand All / Collapse All
Payment Type Charge is compatible with PHP 5.3.
I just repaired a php error.
full package
If you have a question: info@oscommerceforyou.hu
delivery tax fix for Payment Type Charge v1.8 (contrib # 251)
The tax is applied based on the customers primary address, but thats not the osc default behavior.
Osc by default takes the delivery address to apply the taxes.
To achieve this change line 73:
$tod_rate = tep_get_tax_rate(MODULE_FIXED_PAYMENT_CHG_TAX_CLASS);
to:
$tod_rate = tep_get_tax_rate(MODULE_FIXED_PAYMENT_CHG_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id']);
- Dropped configuration entry for "MODULE_FIXED_PAYMENT_CHG_AMOUNT" as this is not used anymore.
- Added possibility to display to extra fee charge in the checkout_payment.php page. Attention, it will only display the extra amount and not the percentage. You can display the extra percentage by changing function "get_payment_cost". This is not included in this contribution but it's should be easy to do.
- dropped Dutch order total file from package as it is impossible to maintain 2 code files (EN + NL). Only the language file can be translated but not the classes and methods. In order to respect the work done by Ralph in v1.7, you can find the dutch configuration entries below. You can replace the English keys by the Dutch ones.
Files impacted : module ot_fixed_payment_chg.php, class payment.php, page checkout_payment.php
- added: support of simultaneous use of both a fixed charge and a percentage for individual payment types.
- added: Dutch language file.
- bugfix: (when using tax/VAT and a charge based on a percentage) tax/VAT amount of the percentage charge is now added to the total tax/VAT amount.
two changes:
new configuration field with opportunity to set the fee-description in dependence of chosen payment method (which is shown in checkout_confirmation.php and Admin/Orders/Details)
bugfix: tax is now calculated & displayed correctly in checkout_confirmation.php and Admin/Orders/Details
The new version alows the user to choose either a fixed payment charge or a percentage value from the total payable amount. e.g.
cod:15,cc:%3.5
This example will add $15 to the total amount for COD or 3.5% of the total with Credit Card payment.
To upgrade simply copy the class over the original file.
What it does?
* it will display the price of a payment on the checkout_payment screen.
* Gives a solution if taxes are not calculated correctly (in MS1 DISPLAY_PRICE_WITH_TAX is a string now)
** Update **
Fixes bug where tax was not calculated correctly, also charge was being being picked up correctly if more than one type was being tested.
Now also takes account of the DISPLAY_PRICE_WITH_TAX define in application_top.
This order_total class allows for a fixed charge to be added depending on payment method.
So you could add say $10 for cod
Also allows for setting charges for more than one payment type.
Drop down in admin for selecting tax class to apply to additional charge.
** Update **
Fixes bug where tax amount was not being added to charge amount. Many thanks to Ralph Hesse for pointing this out.
This order_total class allows for a fixed charge to be added depending on payment method.
So you could add say $10 for cod
Also allows for setting charges for more than one payment type.
Drop down in admin for selecting tax class to apply to additional charge.
** updated **
Fixed infinite loop bug
order total class that lets you set a percentage based charge depending on the payment type the customer uses.
** Update **
Fixes bug where not selecting Tax Class would stop charge showing.
This order_total class allows for a fixed charge to be added depending on payment method.
So you could add say $10 for cod
Also allows for setting charges for more than one payment type.
Drop down in admin for selecting tax class to apply to additional charge.
** updated **
Now uses my standard type:charge, type:charge method. Previously the percentage was the same for all payment types doh!
Also now adjusts sub total when necessary
order total class that lets you set a percentage based charge depending on the payment type the customer uses.
At the moment the charge is the same for all payment types chosen
** Update **
Now updates the order sub total when necessary
This order_total class allows for a fixed charge to be added depending on payment method.
So you could add say $10 for cod
Also allows for setting charges for more than one payment type.
Drop down in admin for selecting tax class to apply to additional charge.
This order_total class allows for a fixed charge to be added depending on payment method.
So you could add say $10 for cod
Also allows for setting charges for more than one payment type.
Drop down in admin for selecting tax class to apply to additional charge.
order total class that lets you set a percentage based charge depending on the payment type the customer uses.
At the moment the charge is the same for all payment types chosen.
Note: Contributions are used at own risk.