diff --git a/vendor/magento/module-negotiable-quote/Helper/Quote.php b/vendor/magento/module-negotiable-quote/Helper/Quote.php index 6346f748b8bc..bce9e88c46f6 100644 --- a/vendor/magento/module-negotiable-quote/Helper/Quote.php +++ b/vendor/magento/module-negotiable-quote/Helper/Quote.php @@ -1,7 +1,18 @@ getBuyRequest(); - foreach ($optionsNames as $option) { + foreach (self::AVAILABLE_OPTIONS_NAMES as $option) { if ($request->hasData($option) && $request->getData($option)) { $options[$option] = $request->getData($option); } diff --git a/vendor/magento/module-negotiable-quote/Model/QuoteItemsUpdater.php b/vendor/magento/module-negotiable-quote/Model/QuoteItemsUpdater.php index 8a9941c05459..21c25f3c38b2 100644 --- a/vendor/magento/module-negotiable-quote/Model/QuoteItemsUpdater.php +++ b/vendor/magento/module-negotiable-quote/Model/QuoteItemsUpdater.php @@ -221,10 +221,32 @@ private function isNeedReconfigurationItem(CartItemInterface $item, array $data) $newConfig = []; // phpcs:ignore Magento2.Functions.DiscouragedFunction parse_str(urldecode($data['config']), $newConfig); + $newConfig = $this->sanitizeConfig($newConfig); return is_array($oldConfig) && is_array($newConfig) && $oldConfig != $newConfig; } + /** + * Filter config + * + * @param array $config + * @return array + */ + private function sanitizeConfig(array $config) : array + { + $configKeys = array_keys($config); + $result = $config; + if (in_array('bundle_option', $configKeys)) { + $result = []; + foreach ($config as $key => $value) { + if (in_array($key, $this->negotiableQuoteHelper::AVAILABLE_OPTIONS_NAMES)) { + $result[$key] = $value; + } + } + } + return $result; + } + /** * Remove quote items from quote. *