diff --git a/README.md b/README.md index e9a75d8d..58ccdd04 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,9 @@ foreach($data['items'] as $item) { } $data['total'] = $total; + +//give a discount of 10% of the order amount +$data['shipping_discount'] = round((10 / 100) * $total, 2); ```