Skip to content

Commit 81f65c1

Browse files
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #15598: [BUGFIX] #15564 Generated admin API token expires immediately (by @krukas) - #15602: set correct annotation (by @sanjay-wagento) - #15477: Variant product image in sidebar wishlist block (by @kishanpatadia) - #15305: chore: remove extraneous cursor property (by @DanielRuf) - #15097: Add field to filter to collection (by @dverkade) Fixed GitHub Issues: - #15564: 2.2.4 Created admin token has no access (reported by @krukas) has been fixed in #15598 by @krukas in 2.2-develop branch Related commits: 1. eab3674 2. 3ca1c6f
2 parents eced127 + 14b057e commit 81f65c1

File tree

6 files changed

+36
-24
lines changed

6 files changed

+36
-24
lines changed

app/code/Magento/Sales/Setup/UpgradeData.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -177,27 +177,27 @@ private function convertSerializedDataToJson($setupVersion, SalesSetup $salesSet
177177
public function fillQuoteAddressIdInSalesOrderAddress()
178178
{
179179
$addressCollection = $this->addressCollectionFactory->create();
180+
$addressCollection->addFieldToFilter('quote_address_id', ['null' => true]);
181+
180182
/** @var \Magento\Sales\Model\Order\Address $orderAddress */
181183
foreach ($addressCollection as $orderAddress) {
182-
if (!$orderAddress->getData('quote_address_id')) {
183-
$orderId = $orderAddress->getParentId();
184-
$addressType = $orderAddress->getAddressType();
185-
186-
/** @var \Magento\Sales\Model\Order $order */
187-
$order = $this->orderFactory->create()->load($orderId);
188-
$quoteId = $order->getQuoteId();
189-
$quote = $this->quoteFactory->create()->load($quoteId);
190-
191-
if ($addressType == \Magento\Sales\Model\Order\Address::TYPE_SHIPPING) {
192-
$quoteAddressId = $quote->getShippingAddress()->getId();
193-
$orderAddress->setData('quote_address_id', $quoteAddressId);
194-
} elseif ($addressType == \Magento\Sales\Model\Order\Address::TYPE_BILLING) {
195-
$quoteAddressId = $quote->getBillingAddress()->getId();
196-
$orderAddress->setData('quote_address_id', $quoteAddressId);
197-
}
198-
199-
$orderAddress->save();
184+
$orderId = $orderAddress->getParentId();
185+
$addressType = $orderAddress->getAddressType();
186+
187+
/** @var \Magento\Sales\Model\Order $order */
188+
$order = $this->orderFactory->create()->load($orderId);
189+
$quoteId = $order->getQuoteId();
190+
$quote = $this->quoteFactory->create()->load($quoteId);
191+
192+
if ($addressType == \Magento\Sales\Model\Order\Address::TYPE_SHIPPING) {
193+
$quoteAddressId = $quote->getShippingAddress()->getId();
194+
$orderAddress->setData('quote_address_id', $quoteAddressId);
195+
} elseif ($addressType == \Magento\Sales\Model\Order\Address::TYPE_BILLING) {
196+
$quoteAddressId = $quote->getBillingAddress()->getId();
197+
$orderAddress->setData('quote_address_id', $quoteAddressId);
200198
}
199+
200+
$orderAddress->save();
201201
}
202202
}
203203
}

app/code/Magento/Webapi/Model/Authorization/TokenUserContext.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ private function isTokenExpired(Token $token): bool
133133
// other user-type tokens are considered always valid
134134
return false;
135135
}
136+
137+
if (empty($tokenTtl)) {
138+
return false;
139+
}
140+
136141
if ($this->dateTime->strToTime($token->getCreatedAt()) < ($this->date->gmtTimestamp() - $tokenTtl * 3600)) {
137142
return true;
138143
}

app/code/Magento/Wishlist/CustomerData/Wishlist.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,14 @@ protected function getItemData(\Magento\Wishlist\Model\Item $wishlistItem)
147147
*/
148148
protected function getImageData($product)
149149
{
150+
/*Set variant product if it is configurable product.
151+
It will show variant product image in sidebar instead of configurable product image.*/
152+
$simpleOption = $product->getCustomOption('simple_product');
153+
if ($simpleOption !== null) {
154+
$optionProduct = $simpleOption->getProduct();
155+
$product = $optionProduct;
156+
}
157+
150158
/** @var \Magento\Catalog\Helper\Image $helper */
151159
$helper = $this->imageHelperFactory->create()
152160
->init($product, 'wishlist_sidebar_block');

lib/internal/Magento/Framework/Stdlib/DateTime/Timezone.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ public function isScopeDateInInterval($scope, $dateFrom = null, $dateTo = null)
286286
* @param string|\DateTimeInterface $date
287287
* @param int $dateType
288288
* @param int $timeType
289-
* @param null $locale
290-
* @param null $timezone
289+
* @param string|null $locale
290+
* @param string|null $timezone
291291
* @param string|null $pattern
292292
* @return string
293293
*/

lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ public function isScopeDateInInterval($scope, $dateFrom = null, $dateTo = null);
124124
* @param string|\DateTimeInterface $date
125125
* @param int $dateType
126126
* @param int $timeType
127-
* @param null $locale
128-
* @param null $timezone
127+
* @param string|null $locale
128+
* @param string|null $timezone
129129
* @param string|null $pattern
130130
* @return string
131131
*/

lib/web/css/source/lib/_buttons.less

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@
266266
&.disabled,
267267
&[disabled],
268268
fieldset[disabled] & {
269-
cursor: not-allowed;
270-
pointer-events: none; // Disabling of clicks
269+
pointer-events: none; // Disabling of all pointer events
271270
.lib-css(opacity, @button__disabled__opacity);
272271
}
273272
}

0 commit comments

Comments
 (0)