Skip to content

Commit 10a0ced

Browse files
MC-36405: Reorder is not working with custom options date with JavaScript Calendar enabled
1 parent 19e9f85 commit 10a0ced

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/code/Magento/Catalog/Model/ProductOptionProcessor.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
use Magento\Catalog\Model\CustomOptions\CustomOptionFactory;
1111
use Magento\Framework\DataObject;
1212
use Magento\Framework\DataObject\Factory as DataObjectFactory;
13-
use Magento\Framework\Serialize\Serializer\Json;
1413

1514
/**
16-
* Processor ofr product options
15+
* Processor for product options
1716
*/
1817
class ProductOptionProcessor implements ProductOptionProcessorInterface
1918
{
@@ -146,7 +145,7 @@ private function getUrlBuilder()
146145
}
147146

148147
/**
149-
* Returns date option value only with 'date_internal data
148+
* Check if the option has a date_internal and date
150149
*
151150
* @param array $optionValue
152151
* @return bool

app/code/Magento/Sales/Model/AdminOrder/Create.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,9 @@ public function initFromOrderItem(\Magento\Sales\Model\Order\Item $orderItem, $q
667667
$productOptions = $orderItem->getProductOptions();
668668
if ($productOptions !== null && !empty($productOptions['options'])) {
669669
$formattedOptions = [];
670+
$useFrontendCalendar = $this->useFrontendCalendar();
670671
foreach ($productOptions['options'] as $option) {
671-
if (in_array($option['option_type'], ['date', 'date_time']) && $this->useFrontendCalendar()) {
672+
if (in_array($option['option_type'], ['date', 'date_time']) && $useFrontendCalendar) {
672673
$product->setSkipCheckRequiredOption(false);
673674
break;
674675
}

0 commit comments

Comments
 (0)