@@ -298,8 +298,8 @@ public function getItemCollection()
298298
299299 /* update compare items count */
300300 $ count = count ($ this ->_itemCollection );
301- $ counts [$ this ->_storeManager ->getWebsite ()->getId ()] = $ count ;
302- $ this ->_catalogSession ->setCatalogCompareItemsCountPerWebsite ($ counts );
301+ $ counts [$ this ->_storeManager ->getStore ()->getId ()] = $ count ;
302+ $ this ->_catalogSession ->setCatalogCompareItemsCountPerStoreView ($ counts );
303303 $ this ->_catalogSession ->setCatalogCompareItemsCount ($ count ); //deprecated
304304 }
305305
@@ -330,8 +330,8 @@ public function calculate($logout = false)
330330 ->setVisibility ($ this ->_catalogProductVisibility ->getVisibleInSiteIds ());
331331
332332 $ count = $ collection ->getSize ();
333- $ counts [$ this ->_storeManager ->getWebsite ()->getId ()] = $ count ;
334- $ this ->_catalogSession ->setCatalogCompareItemsCountPerWebsite ($ counts );
333+ $ counts [$ this ->_storeManager ->getStore ()->getId ()] = $ count ;
334+ $ this ->_catalogSession ->setCatalogCompareItemsCountPerStoreView ($ counts );
335335 $ this ->_catalogSession ->setCatalogCompareItemsCount ($ count ); //deprecated
336336
337337 return $ this ;
@@ -344,13 +344,13 @@ public function calculate($logout = false)
344344 */
345345 public function getItemCount ()
346346 {
347- $ counts = $ this ->_catalogSession ->getCatalogCompareItemsCountPerWebsite () ?: [];
348- if (!isset ($ counts [$ this ->_storeManager ->getWebsite ()->getId ()])) {
347+ $ counts = $ this ->_catalogSession ->getCatalogCompareItemsCountPerStoreView () ?: [];
348+ if (!isset ($ counts [$ this ->_storeManager ->getStore ()->getId ()])) {
349349 $ this ->calculate ();
350- $ counts = $ this ->_catalogSession ->getCatalogCompareItemsCountPerWebsite () ?: [];
350+ $ counts = $ this ->_catalogSession ->getCatalogCompareItemsCountPerStoreView () ?: [];
351351 }
352352
353- return $ counts [$ this ->_storeManager ->getWebsite ()->getId ()] ?? 0 ;
353+ return $ counts [$ this ->_storeManager ->getStore ()->getId ()] ?? 0 ;
354354 }
355355
356356 /**
0 commit comments