Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / How can I change a order total depending of the payment

How can I change a order total depending of the payment

Locked

Views: 1,225

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
3 Sep 2008, 9:00 AM
#1
minute avatar

minute

New Zenner

Join Date:
Dec 2007
Posts:
50
Plugin Contributions:
0

How can I change a order total depending of the payment

Hello,

This is my case: I have on Order Total module, a fee of 1% of the total order.

"Taxa Ramburs (1%) ot_loworderfee 400"

But I want this to be enable only when module "cod" (on payment) is chosen.

Why is that, my carrier demands a 1% of the total payment if the money cames back with him. But if the customer wants to pay in other ways, this tax is not neccesary.

Please help me, I need this think, any ideea?

3 Sep 2008, 2:51 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: How can I change a order total depending of the payment

Did you look at the Modules ... Order Totals ... COD Fee ot_cod ... to see if that might work for you in the way that you need this done?

Currently, this is a set fee, however it could be adapted to be a percentage of the total ...

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!

4 Sep 2008, 7:34 AM
#3
minute avatar

minute

New Zenner

Join Date:
Dec 2007
Posts:
50
Plugin Contributions:
0

Re: How can I change a order total depending of the payment

I am very confused. Can you help me on doing this? On checkout it shows "Note: COD fees may apply" just below the payment module I need, but I don`t know how to configure it to be 1% of the payment. Please give me a hint.

Thank you!

4 Sep 2008, 2:32 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: How can I change a order total depending of the payment

In the ot_cod.php you will find the: $cod_cost

This is how much to add to the order total based on the setting on the module ...

What you want to do is change this to a percentage of the total order:
$order->info['total']

If you look through the code, you will see where the $cod_cost is created and you can adjust it so that when it is add to the $order->info['total'] you have calculated the $cod_cost to be a percentage of $order->info['total'] vs using the settings on each of the shipping methods that are set in this Order Totals module ...

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!