Post by rocky79 » Fri Jul 05, 2013 5:12 am

Hello,

I have been looking for ways to remove the handling fees and combine it into the USPS shipping charges, after few trial and errors I managed to get it working.

After this DIY you will be able to combine handling fees + Paypal percentage fees based on the total amount( subtotal + shipping cost) into the final shipping cost.

You will also be able to do seperate handling fee and paypal fee for international customers.

Let's say you want to charge $1.00 handling fee and 3.00% paypal fee.

Step1-
In your control panel open the USPS php file located here: catalog/model/shipping/usps.php

Step2-
Add the code below to line 380 or after this statement ( $cost = $postage->getElementsByTagName): code:

Code: Select all

 $cost= $cost + 1.00 + (($cost + $this->cart->getSubTotal() + 1.00) / 100)*3;
Step3-
Add the same code above to line 392.

For international customers add the same code to line 432 except now you could modify the charges to reflect paypal fees for international customers:

I hope this helps, I am by no means a programer, so if you found a way to improve this code please share it. Thank you !

Newbie

Posts

Joined
Sat Feb 23, 2013 2:50 pm

Post by NoScope » Tue Jan 21, 2014 1:03 pm

For WEEKS I have been trying to find a solution to this problem. I am amazed and confused that nobody has replied to this thread yet. Thank you for this solution, it worked perfectly! The line numbers were different than mine, but it wasn't too hard to figure out. I just added the code below every line that said " $cost = $postage.... " which was a total of 3 lines, first 2 were domestic, last 1 was international. Amazing, thank you so much for this easy fix for such an unnecessarily complicated issue.

New member

Posts

Joined
Tue Dec 31, 2013 11:33 am
Who is online

Users browsing this forum: No registered users and 1 guest