angelleye / woo-paypal-here

Process WooCommerce Orders with PayPal Here
GNU General Public License v3.0
6 stars 2 forks source link

Shipping amount update on web app adding instead of replacing. #38

Closed angelleye closed 6 years ago

angelleye commented 6 years ago

We load a pending order from WC into the web app and it comes in with $10.00 for example. Then we click to adjust shipping, and we change it to flat rate 20.00, and it changes to $30.00 instead of 20.00.

angelleye commented 6 years ago

This seems very random. If I set shipping to 0.00, it's actually adjusting the value up again. Something is not right here and needs to be reviewed and fixed.

angelleye commented 6 years ago

@kcppdevelopers Flat rate shipping seems to be working better now, but percentage based is not.

I'm testing on an order with total 44.04 (40.00 item and 3.08 tax) and I set the shipping to 2%. The shipping amounted applied is 0.96.

2% of the item total, $40, is .80.

2% of item + tax, $43.08, is .86.

So not sure where we're coming up with .96 in this instance..??

angelleye commented 6 years ago

@kcppdevelopers Also, not sure what's going on with the Postal Code option for shipping. I choose that option and enter a postal code, but it doesn't update anything. It just leaves the order with the same shipping as before.

In woo.angelleye.com settings we currently have a single shipping rule setup for flat rate at 11.00, so I was expecting the shipping to update to 11.00 based on that rule when I use the zip code method..??

kcppdevelopers commented 6 years ago

@angelleye I have checked found that Postal Code shipping calculation required country code. without country code shipping calculation not working in the woo.

angelleye commented 6 years ago

@kcppdevelopers Okay, that makes sense. In that case we should display a message to the user about that. Can we do that easily?

angelleye commented 6 years ago

@kcppdevelopers Per slack chat, we'll use a Google service instead to pull the country code for the given postal code when one is not already available.