From baef8cc91f5fd86cde021acc6a9630cca009669f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sun, 14 May 2023 16:26:04 +0800 Subject: Improve the order implementation --- interchange.hxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'interchange.hxx') diff --git a/interchange.hxx b/interchange.hxx index f412377..582a007 100644 --- a/interchange.hxx +++ b/interchange.hxx @@ -61,23 +61,27 @@ namespace QInterchange { void defaultAllProducts(); /*! * \brief For putting an item to a cart. - * \param sku The SKU of the item to order. + * \param sku The product or variant SKU of the item. + * \param item The product SKU of the item to order. + * \param quantity The quantity of the item to order. */ - void order(QString const& sku); + void order(const QString &sku, + const QString &item = "", + const int quantity = 1); signals: void gotPage(QString const& path, QString const& response); void gotCatalog(QString const& response); void gotProduct(QString const& response); - void gotOrder(QString const& response); + void gotOrder(const QString &response); protected: void emitPage(QString const& path, QString const& response); void emitCatalog(QString const& response); void emitProduct(QString const& response); - void emitOrder(QString const& response); + void emitOrder(const QString &response); }; } -- cgit v1.2.3