From f0e3b2bbcbea3d04e4053120a22c52cb0f3d6bd5 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 28 Apr 2022 15:17:30 +0200 Subject: [PATCH] Update addProduct to be more inclusive --- composer.json | 2 +- src/Service/CustomerQuote.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 773a5d5..9138d44 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "php": ">=7.4.0" }, "type": "magento2-module", - "version": "1.0.3", + "version": "1.0.4", "license": [ "MIT" ], diff --git a/src/Service/CustomerQuote.php b/src/Service/CustomerQuote.php index 7f637ba..c81646a 100644 --- a/src/Service/CustomerQuote.php +++ b/src/Service/CustomerQuote.php @@ -90,9 +90,9 @@ public function getQuote(): CartInterface public function addProduct( CartInterface $quote, ProductInterface $product, - int $quantity = 1 + ?\Magento\Framework\DataObject $request = null ): void { - $quote->addProduct($product, $quantity); + $quote->addProduct($product, $request); $this->quoteRepository->save($quote); }