♥Tsimi Posted July 17, 2015 Share Posted July 17, 2015 (edited) I found a possible bug when using PayPal Express v3.1 and Free Shipping. I tried various shipping modules and stock osC shop and non stock osC shop, same issue all over. To recreate this issue please follow the instructions below. This might get a bit long or complicated so bare with me. First access your admin area and go to your Order Total modules. There click on the ot_shipping.php module and apply the following settings. Allow Free Shipping: trueFree Shipping For Orders Over: $82 Provide Free Shipping For Orders Made: both Make sure the flat rate shipping module is set to true and an amount of $5. Also setup the PayPal Express module. (Doesn't matter if it is live or sandbox mode you won't need to go through the whole checkout anyway.) Now go to the front end and add 1x "Die Hard With A Vengeance" to your shopping cart. Proceed to the checkout (No matter which button, PP or osC one.) and continue until you see the PayPal screen. (No need to login...) At this point you should see the listed item with shipping charges and all is fine and correctly calculated. Now cancel the procedure by clicking on the "Cancel and return to...." link. Now you should be back at the shopping_cart.php page. Change the quantity to 2 and update the cart. You should now have a sub-total amount of $79.98 (still $2.02 short of getting free shipping!) Now click on the checkout button (here again no matter which one) and you should now see a Free Shipping message or if you clicked the PP button you should be at the PP page. And if you continue with the normal checkout and reach the PP Page again you will see only the items listed without any shipping charged. Even though you have not reached the $82 yet to qualify for free shipping. My guess is that it calculates the order total including shipping cost and therefore it shows the Free Shipping message even if you haven't reached a sub-total of $82. So now I'll go bug hunting.... UPDATE INFO: Another way is to add the Die Hard DVD to the cart update the quantity to 2 and click on the PP checkout button. Then at the PP Page abort the checkout.Now back at the shopping cart page click on the normal osC checkout button and you should see again the Free Shipping message. (Here again, sub-total is $79.98 and you should not qualify for free shipping!) Edited July 17, 2015 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted July 17, 2015 Author Share Posted July 17, 2015 (edited) Ok bug hunt was successful. Now that I know what needs to be done i recall somebody posting the same or similar solution a while back. 2 Files need to be fixed. ext/modules/payment/paypal/express.php look for this following code (3 instances!, around Line 177, Line 504, Line 693): if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) { replace with: if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) { same goes for the checkout_shipping.php file. (1 instance only). Look for the same code and replace it, same as explained above. Did some testing and all seems to be running fine now. Edited July 17, 2015 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥DAVID3733 Posted November 20, 2021 Share Posted November 20, 2021 Can confirm this worked for me Thank you for sharing Quote David 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.