-1

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.

Raphael
  • 67
  • 1
  • 6

1 Answers1

0

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
}
user2170627
  • 140
  • 5
  • Hello, thank you for the answer, but I've just found a solution before you made reply. Once again thank you very much even if the answer is late. Cheers to you my friend. – Raphael Mar 18 '14 at 17:53