diff options
-rw-r--r-- | interchange/ord.h | 5 | ||||
-rw-r--r-- | ord.c | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/interchange/ord.h b/interchange/ord.h index dffd902..16c4e64 100644 --- a/interchange/ord.h +++ b/interchange/ord.h @@ -40,11 +40,12 @@ void interchange_ord_order(const char *sku, /*! * \brief For removing an item from a cart. * \param name The name given, in the cart, to the item. + * \param orderpage The order page, by default it's ord/basket. * \param nextpage The page to expect response from, whatever the result is. * \param parser Function for parsing the formatted response. */ -void interchange_ord_remove(const char *name, const char *nextpage, - void (*parser)(interchange_response *)); +void interchange_ord_remove(const char *name, const char *orderpage, + const char *nextpage, void (*parser)(interchange_response *)); /*! * \brief For checking out items in the cart. @@ -11,12 +11,13 @@ void interchange_ord_order(const char *sku, request(handler, NULL, NULL, "%s%s", "order?mv_arg=", sku); } -void interchange_ord_remove(const char *name, const char *nextpage, - void (*parser)(interchange_response *)) +void interchange_ord_remove(const char *name, const char *orderpage, + const char *nextpage, void (*parser)(interchange_response *)) { - request(parser, NULL, &(struct body){ 2 + (nextpage ? 1 : 0), { + request(parser, NULL, &(struct body){ 3 + (nextpage ? 1 : 0), { { name, "0" }, { "mv_doit", "refresh" }, + { "mv_orderpage", orderpage ? orderpage : "ord/basket" }, { "mv_nextpage", nextpage } }}, "%s", "process"); } |