Skip to content

Commit 148de2e

Browse files
committed
ACP2E-2224: Regular Price does not show on PLP for Configurable Product
- improvements for updated PAT failures
1 parent 3f320ba commit 148de2e

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

app/code/Magento/Catalog/Pricing/Price/SpecialPriceBulkResolver.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
use Magento\Catalog\Api\Data\ProductInterface;
2222
use Magento\Catalog\Model\Category;
2323
use Magento\Catalog\Model\Product;
24-
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
2524
use Magento\Eav\Model\Entity\Collection\AbstractCollection;
2625
use Magento\Framework\App\ResourceConnection;
2726
use Magento\Framework\Cache\FrontendInterface;
@@ -179,7 +178,7 @@ private function saveCachedData(string $cacheKey, array $data, array $productTag
179178
];
180179
$productTags = array_unique($productTags);
181180
foreach ($productTags as $tag) {
182-
$tags[] = Configurable::TYPE_CODE . '_' . $tag;
181+
$tags[] = Product::CACHE_TAG . '_' . $tag;
183182
}
184183

185184
return $this->cache->save(json_encode($data), $cacheKey, $tags, $this->cacheLifeTime);

app/code/Magento/Catalog/Pricing/Price/SpecialPriceBulkResolverInterface.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
<?php
2+
/************************************************************************
3+
*
4+
* Copyright 2023 Adobe
5+
* All Rights Reserved.
6+
*
7+
* NOTICE: All information contained herein is, and remains
8+
* the property of Adobe and its suppliers, if any. The intellectual
9+
* and technical concepts contained herein are proprietary to Adobe
10+
* and its suppliers and are protected by all applicable intellectual
11+
* property laws, including trade secret and copyright laws.
12+
* Dissemination of this information or reproduction of this material
13+
* is strictly forbidden unless prior written permission is obtained
14+
* from Adobe.
15+
* ************************************************************************
16+
*/
17+
declare(strict_types=1);
218

319
namespace Magento\Catalog\Pricing\Price;
420

app/code/Magento/Catalog/Test/Unit/Block/Product/ListProductTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ protected function setUp(): void
143143
$this->context->expects($this->any())->method('getEventManager')->willReturn($eventManager);
144144
$storeManager = $this->createMock(StoreManagerInterface::class);
145145
$store = $this->createMock(StoreInterface::class);
146-
$storeManager->expects($this->once())->method('getStore')->willReturn($store);
147-
$this->context->expects($this->once())->method('getStoreManager')->willReturn($storeManager);
146+
$storeManager->expects($this->any())->method('getStore')->willReturn($store);
147+
$this->context->expects($this->any())->method('getStoreManager')->willReturn($storeManager);
148148

149149
$this->block = $objectManager->getObject(
150150
ListProduct::class,

app/code/Magento/Catalog/Test/Unit/Pricing/Price/SpecialPriceBulkResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function testGenerateSpecialPriceMapCollection(): void
126126
'e.entity_id'
127127
]
128128
)->willReturnSelf();
129-
$connection->expects($this->once())->method('fetchAssoc')->willReturn(
129+
$connection->expects($this->once())->method('fetchAll')->willReturn(
130130
[
131131
[
132132
'product_id' => 2,

0 commit comments

Comments
 (0)