From 576c91ca2bbd0167bb2b1ff1fe0d9c96bfad832f Mon Sep 17 00:00:00 2001 From: Aleksandr_Zavadkin Date: Wed, 19 Jun 2024 22:19:35 +0900 Subject: [PATCH] docs(products): get clients shopping cart Signed-off-by: Aleksandr_Zavadkin --- source/includes/_products.md.erb | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/source/includes/_products.md.erb b/source/includes/_products.md.erb index 7917db4..e293709 100644 --- a/source/includes/_products.md.erb +++ b/source/includes/_products.md.erb @@ -486,7 +486,24 @@ curl 'https://<%= config[:api_endpoint] %>/products/cart?did=DEVICE_ID&shop_id=S ``` ```jsx -// Not implemented yet. + cart() { + return new Promise((resolve, reject) => { + this.push((() => { + try { + request('products/cart', { + params: { + shop_id: this.shop_id, + }, + }).then( res => { + resolve(res) + }); + } catch (error) { + reject(error) + } + })); + }) + } + ``` ### HTTP Request