Skip to content

Commit

Permalink
Options not exists in product, now before add options for quotation t…
Browse files Browse the repository at this point in the history
…here is a test for check the option in the product
  • Loading branch information
alexandercamps0 committed Dec 16, 2022
1 parent 4edb90e commit af3c098
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Model/Catalog/Product/View/RateRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ private function prepareProductOptionRequest(ProductInterface $product, int $qty

$optionsValues = [];
foreach ($customOptions->getItems() as $option) {
$optionsValues[$option->getId()] = $optionsRequest[$option->getId()];
if (array_key_exists($option->getId(), $optionsRequest)) {
$optionsValues[$option->getId()] = $optionsRequest[$option->getId()];
}
}

$request->setData(['qty' => $qty, 'options' => $optionsValues]);
Expand Down

0 comments on commit af3c098

Please sign in to comment.