OSCommerce:
In order total, I just need the variable of the shipping cost. I need condition like, if shipping cost is zero then..... else ....
Your help is really appreciated.
OSCommerce:
In order total, I just need the variable of the shipping cost. I need condition like, if shipping cost is zero then..... else ....
Your help is really appreciated.
There are a couple of ways to get the selected shipping method cost during checkout. The first way is to grab the cost from the $order object, like this:
if ($order->info['shipping_cost'] <= 0) {
// do something
} else {
// do something else
}
If you need to get the shipping cost without the use of the $order object, you can use the $shipping $_SESSION variable. You can easily check the selected shipping method cost like this:
if ($shipping['cost'] <= 0) {
// do something
} else {
// do something else
}