Skip to content

Commit d99e231

Browse files
MC-29775: [Magento Cloud] Recently Viewed products issues in Multi website and store setup
1 parent 18c339e commit d99e231

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

app/code/Magento/Catalog/view/frontend/web/js/product/provider.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ define([
143143
_.each(ids, function (id) {
144144
if (
145145
currentTime - id['added_at'] < ~~this.idsStorage.lifetime &&
146-
!_.contains(currentProductIds, id['product_id'])
146+
!_.contains(currentProductIds, id['product_id']) &&
147+
(!id.hasOwnProperty('website_id') || id['website_id'] === window.checkout.websiteId)
147148
) {
148149
_ids[id['product_id']] = id;
149150

app/code/Magento/Catalog/view/frontend/web/js/product/storage/ids-storage-compare.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ define([
7272
_.each(data, function (item) {
7373
result[item.id] = {
7474
'added_at': new Date().getTime() / 1000,
75-
'product_id': item.id
75+
'product_id': item.id,
76+
'website_id': window.checkout.websiteId
7677
};
7778
});
7879

app/code/Magento/Catalog/view/frontend/web/js/product/view/provider.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ define([
9090
_.each(this.data.items, function (item, key) {
9191
result[key] = {
9292
'added_at': new Date().getTime() / 1000,
93-
'product_id': key
93+
'product_id': key,
94+
'website_id': window.checkout.websiteId
9495
};
9596
}, this);
9697

0 commit comments

Comments
 (0)