summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-11-04 19:13:06 +0700
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-11-04 19:13:06 +0700
commit8e8696ca1a54e955ff91a72d745bc911cf26cfb2 (patch)
tree9d90918a4eae08278e6ac7a5695737d30660e1c7
parentf80e3c5de98a637e0907eea3610682a8edb53a57 (diff)
Same item doesn't add to nitems
-rw-r--r--client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client.c b/client.c
index 4edecae..e737380 100644
--- a/client.c
+++ b/client.c
@@ -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);
}