Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

PayPal Express and Free Shipping issue. Bug?


Recommended Posts

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: true
Free 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....




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 by Tsimi
Link to comment
Share on other sites

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.




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 by Tsimi
Link to comment
Share on other sites

  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...