Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Charge Handling over Certain Amount

Charge Handling over Certain Amount

Locked

Views: 1,425

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
6 Apr 2009, 12:35 PM
#1
cajunman0821 avatar

cajunman0821

New Zenner

Join Date:
Mar 2009
Posts:
10
Plugin Contributions:
0

Charge Handling over Certain Amount

I have been looking and have not been able to find this anywhere.

I would like to start charging a "handling" fee after a the total $ amount is, for instance $60. So any time the customer orders more the $60 worth of products, we charge an extra $2. But if they order less than $60, there is no handling charge.

Does anybody know how to do this? Please help.

Thank you very much in advance.:D

6 Apr 2009, 2:21 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Charge Handling over Certain Amount

If you look in the Shipping Module(s) that you use there is a reference to handling ...

You could customize that to be based on the total as to whether to apply it or not ...

6 Apr 2009, 3:16 PM
#3
cajunman0821 avatar

cajunman0821

New Zenner

Join Date:
Mar 2009
Posts:
10
Plugin Contributions:
0

Re: Charge Handling over Certain Amount

You say I could customize to do this based on the amount. Does that mean I would have to customize the php code or is there already something in place that would do this easily?
Thanks again.

6 Apr 2009, 3:36 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Charge Handling over Certain Amount

You would customize the shipping modules(s) php code for this where you see the handling charge being applied and combined with the cost ...

6 Apr 2009, 6:31 PM
#5
cajunman0821 avatar

cajunman0821

New Zenner

Join Date:
Mar 2009
Posts:
10
Plugin Contributions:
0

Re: Charge Handling over Certain Amount

I added the following code:

if ($cost > 65)
{
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
}
else
{
$methods[] = array('id' => $type,
'title' => $title,
'cost' => $cost * $shipping_num_boxes);
}

The problem with this is that the $COST variable is not the subtotal of the cart, it is the cost of shipping.

So I see two different options here. 1.) Find the variable for the sub-total of the cart and use that variable in this code instead of $COST. 2.) Find variable for the sub-total and in that module, change the value of MODULE_SHIPPING_USPS_HANDLING accordingly.

Any suggestions here?

Thanks.

6 Apr 2009, 7:08 PM
#6
cajunman0821 avatar

cajunman0821

New Zenner

Join Date:
Mar 2009
Posts:
10
Plugin Contributions:
0

Re: Charge Handling over Certain Amount

I ended up adding the following code to get the sub-total:
$cartShowTotal = $_SESSION['cart']->show_total();
if ($cartShowTotal > 65){...

instead of uses the $COST variable

Thanks again for your help.

Let me know if this could cause problems.

6 Apr 2009, 8:58 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Charge Handling over Certain Amount

I'd have to test it but that is the right idea that you are using ... :smile: