diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-11-04 19:13:06 +0700 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-11-04 19:13:06 +0700 |
commit | 8e8696ca1a54e955ff91a72d745bc911cf26cfb2 (patch) | |
tree | 9d90918a4eae08278e6ac7a5695737d30660e1c7 | |
parent | f80e3c5de98a637e0907eea3610682a8edb53a57 (diff) |
Same item doesn't add to nitems
-rw-r--r-- | client.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -101,6 +101,7 @@ void icclient_order(icclient_ord_order **orderptr, const char *sku + (i + 1) * sizeof(icclient_ord_item)); order = *orderptr; order->items[i] = malloc(sizeof(icclient_ord_item)); + order->nitems++; item = order->items[i]; item->product = product; item->quantity = 1; @@ -108,7 +109,6 @@ void icclient_order(icclient_ord_order **orderptr, const char *sku order->subtotal += item->product->price; order->total_cost += item->product->price; - order->nitems++; request(NULL, NULL, NULL, "%s%s", "order?mv_arg=", sku); } |