From c89d2ff4c333c453b5fdbbf65013191bd783a6b0 Mon Sep 17 00:00:00 2001 From: SofWar <7130905+sofwar@users.noreply.github.com> Date: Tue, 17 Jul 2018 12:25:02 +0300 Subject: [PATCH] An example of work with a discount is added (#219) --- README.md | 3 +++ 1 file changed, 3 insertions(+) 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); ```