From 5a9949a24e543730b37aab50155d0da21aedb238 Mon Sep 17 00:00:00 2001 From: jordanarldt Date: Tue, 17 Dec 2024 09:57:34 -0600 Subject: [PATCH] STRF-12475: Add postFormData for cart.php to stencil-utils --- src/api/cart.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/api/cart.js b/src/api/cart.js index 9c2d631..d0b18a9 100644 --- a/src/api/cart.js +++ b/src/api/cart.js @@ -259,6 +259,16 @@ export default class extends Base { this.remoteRequest('/cart/update', 'POST', { params: payload }, callback); } + /** + * POST form data to /cart.php + * + * @param {FormData} formData + * @param {Function} callback + */ + postFormData(formData, callback) { + this.makeRequest('/cart.php', 'POST', { formData }, false, callback); + } + /** * Get cart content *