Forums / Built-in Shipping and Payment Modules / Add fee percentage for COD payment

Add fee percentage for COD payment

Locked

Views: 1,863

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
12 Nov 2009, 10:49 PM
#1
avotecnica avatar

avotecnica

New Zenner

Join Date:
Dec 2008
Posts:
8
Plugin Contributions:
0

Add fee percentage for COD payment

:oops:
I'm sorry for my english but i'm italian, classic pizza and spaghetti...:D
I would like add 5% at the total if the customers chose COD payment. It's possible? Now i can add a fix cost but no percentage...thankyou from Italy

https://www.avotecnica.com/minimoto is my future :blush:site..

13 Nov 2009, 11:11 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Add fee percentage for COD payment

It looks like Zencart just supports a fixed fee. Can you average the fee over all expected COD ordrs?

13 Nov 2009, 7:15 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Add fee percentage for COD payment

You could customize the file:
/includes/modules/order_total/ot_cod_fee.php

and change the code at:

            for ($i = 0; $i < count($cod_zones); $i++) {
              if ($cod_zones[$i] == $order->delivery['country']['iso_code_2']) {
                  $cod_cost = $cod_zones[$i + 1];
                  $cod_country = true;
                  //print('match' . $i . ': ' . $cod_cost);
                  break;
                } elseif ($cod_zones[$i] == '00') {
                  $cod_cost = $cod_zones[$i + 1];
                  $cod_country = true;
                  //print('match' . $i . ': ' . $cod_cost);
                  break;
                } else {
                  //print('no match');
                }
              $i++;
            }

and have the $cod_cost built based on a percentage rather than a flat amount ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Nov 2009, 12:14 PM
#4
avotecnica avatar

avotecnica

New Zenner

Join Date:
Dec 2008
Posts:
8
Plugin Contributions:
0

Re: Add fee percentage for COD payment

:blink:

i had install mod Credit Card Surcharge Fee and it's ok but the result is: TOTALE xx €uro and then there is + XX €uro for the COD but i'd like to do the sum of the two results.

In the superinvoice it's ok:
Totale parziale: 106 €
Spedizione a peso: 30 €
IVA 20.0%: 18 €
Totale: 136 €
Supplemento contrassegno: +7 € (add percentage 5% COD)
Amount Applied: 0 €
Balance Due: 143 € <<<<OK

but in the list of the superorder and in the history of the customer the total is 136 €uro and not 143...
It's possible (best solution) sum the order[total] + the percentage for the COD or hide the Balance Due and not the normal total (not the best solution)?:oops:

8 Feb 2010, 9:55 PM
#5
fito100 avatar

fito100

New Zenner

Join Date:
Nov 2009
Posts:
3
Plugin Contributions:
0

Re: Add fee percentage for COD payment

Hello say the same thing as avotecnica partner, I apologize for my English.

There are ways to modify the COD payment module that you can purchase a fixed amount up to 100 euros and as a percentage of this amount.

Thanks