Just2Bad Posted January 6, 2004 Share Posted January 6, 2004 Hi, is there a contribution somewhere that can add the fee of COD shipping to the customer order. Since it's costing 6$ here for a COD we need to charge it back but the defaul module in oscommerce doesn't have the option to add the fee Thanks.... Quote Link to comment Share on other sites More sharing options...
defender39 Posted January 7, 2004 Share Posted January 7, 2004 You can take the "Payment Type Surcharge" contrib and make it work. http://www.oscommerce.com/community/contributions,1306 I needed the same thing on my site and this works great. Takes just a little modification to work. Basically its setup to charge someone a % handling fee for Paypal. You just need to make the charge static $ amount which aint too hard. Then in admin define the charge to COD or whatever your cod module is named. If someone uses COD as payment type they are charged the additional figure you have named. If you have trouble with the mod lmk with a PM and I will post my changes. Quote Link to comment Share on other sites More sharing options...
Just2Bad Posted January 7, 2004 Author Share Posted January 7, 2004 you're the man !!! :D working juste fine with very little mod thanks Quote Link to comment Share on other sites More sharing options...
defender39 Posted January 31, 2004 Share Posted January 31, 2004 I have been asked how to make the surcharge a flat fee instead of a percentage. change in your ot_surcharge.php function calculate_fee($amount) { global $order, $customer_id, $payment; $od_amount=0; $od_pc = $this->percentage + .35; //this is percentage plus the base fee $do = false; if ($amount > $this->minimum) { $table = split("[,]" , MODULE_PAYMENT_TYPE); for ($i = 0; $i < count($table); $i++) { if ($payment == $table[$i]) $do = true; } if ($do) { // Calculate tax reduction if necessary if($this->calculate_tax == 'true') { // Calculate main tax reduction $tod_amount = round($order->info['tax']*10)/10*$od_pc/100; $order->info['tax'] = $order->info['tax'] + $tod_amount; // Calculate tax group deductions reset($order->info['tax_groups']); while (list($key, $value) = each($order->info['tax_groups'])) { $god_amount = round($value*10)/10*$od_pc/100; $order->info['tax_groups'][$key] = $order->info['tax_groups'][$key] + $god_amount; } } //$od_amount = round($amount*10)/10*$od_pc/100; $od_amount = $this->percentage; $od_amount = $od_amount + $tod_amount; } } return $od_amount; } you will see around line 68 I commented out $od_amount = round($amount*10)/10*$od_pc/100; and added after it $od_amount = $this->percentage; this seems to work great for me Quote Link to comment Share on other sites More sharing options...
meandrew Posted August 26, 2004 Share Posted August 26, 2004 this seems to work fine for adding a flat rate as opposed to a % has anyone had any luck with actually getting it to work with the tax? for some reason the tax screws up. It seems to be making its own numbers up Andrew Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.