Skip to content

Commit 1747379

Browse files
author
Anna Bukatar
committed
ACP2E-2621: Widget content is not updating on cms page
1 parent ebc1966 commit 1747379

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
6969
*/
7070
public const CACHE_PRODUCT_CATEGORY_TAG = 'cat_c_p';
7171

72-
/**
73-
* New product cache tag used for New Products widget
74-
*/
75-
public const NEW_PRODUCT_CACHE_TAG = 'cat_p_new';
76-
7772
/**
7873
* Product Store Id
7974
*/
@@ -2385,6 +2380,7 @@ private function getProductCategoryIdentities(array $categoryIds): array
23852380
* Get identities
23862381
*
23872382
* @return array
2383+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
23882384
*/
23892385
public function getIdentities()
23902386
{
@@ -2414,7 +2410,7 @@ public function getIdentities()
24142410
$isProductNew = $this->getOrigData('news_from_date') != $this->getData('news_from_date')
24152411
|| $this->isObjectNew();
24162412
if ($isProductNew && ($isStatusChanged || $this->getStatus() == Status::STATUS_ENABLED)) {
2417-
$identities[] = self::NEW_PRODUCT_CACHE_TAG;
2413+
$identities[] = \Magento\Catalog\Block\Product\NewProduct::CACHE_TAG;
24182414
}
24192415

24202416
return array_unique($identities);

0 commit comments

Comments
 (0)