Jump to content
Latest News: (loading..)

Archived

This topic is now archived and is closed to further replies.

John W

low order fee modification

Recommended Posts

Occasionally, I have to edit an order down to zero and the low order fee kicks in if it’s set to true.  So, first I have to turn the low order fee off and then remember to turn it back on.  So, today I had the idea to change the conditional statement to check the order is not zero.  If the items are taken down to zero, then the low order fee does not apply. 

if anyone wants to do this, in class "ot_loworderfee" find

        if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER)) {

and change to

        if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER)
                             && ( ($order->info['total'] - $order->info['shipping_cost']) > 0) ) {        

Probably makes more sense to have the zero test condition first, but really doens't matter.  I've tested and it works. 


I'm not really a dog.

Share this post


Link to post
Share on other sites

×