Skip to content

Commit 0e0407a

Browse files
Merge pull request #224 from magento-commerce/1.1.77-release
1.1.77 Release
2 parents 688c5fa + 19c80e0 commit 0e0407a

18 files changed

+2835
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/quality-patches",
33
"description": "Provides quality patches for AdobeCommerce & Magento OpenSource",
44
"type": "magento2-component",
5-
"version": "1.1.76",
5+
"version": "1.1.77",
66
"license": "proprietary",
77
"repositories": {
88
"repo": {

patches-info.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
diff --git a/vendor/magento/module-customer-segment/Model/Customer.php b/vendor/magento/module-customer-segment/Model/Customer.php
2+
index 169859499b69..6e95be722f2a 100644
3+
--- a/vendor/magento/module-customer-segment/Model/Customer.php
4+
+++ b/vendor/magento/module-customer-segment/Model/Customer.php
5+
@@ -460,7 +460,7 @@ public function addVisitorToWebsiteSegments($visitorSession, $websiteId, $segmen
6+
$visitorSession->setCustomerSegmentIds($visitorSegmentIds);
7+
8+
$value = array_filter($visitorSegmentIds[$websiteId]);
9+
- $this->_httpContext->setValue(Data::CONTEXT_SEGMENT, $value, $value);
10+
+ $this->_httpContext->setValue(Data::CONTEXT_SEGMENT, $value, []);
11+
12+
return $this;
13+
}
14+
@@ -493,7 +493,7 @@ public function removeVisitorFromWebsiteSegments($visitorSession, $websiteId, $s
15+
? array_filter($visitorCustomerSegmentIds[$websiteId])
16+
: [];
17+
18+
- $this->_httpContext->setValue(Data::CONTEXT_SEGMENT, $value, $value);
19+
+ $this->_httpContext->setValue(Data::CONTEXT_SEGMENT, $value, []);
20+
21+
return $this;
22+
}
23+
@@ -505,6 +505,7 @@ public function removeVisitorFromWebsiteSegments($visitorSession, $websiteId, $s
24+
* @param int $websiteId
25+
* @param array $segmentIds
26+
* @return $this
27+
+ * @throws LocalizedException
28+
*/
29+
public function addCustomerToWebsiteSegments(int $customerId, int $websiteId, array $segmentIds): Customer
30+
{
31+
@@ -522,6 +523,7 @@ public function addCustomerToWebsiteSegments(int $customerId, int $websiteId, ar
32+
$visitorCustomerSegmentIds[$websiteId] = !empty($visitorCustomerSegmentIds[$websiteId])
33+
? array_unique(array_merge($visitorCustomerSegmentIds[$websiteId], $value))
34+
: $value;
35+
+ sort($visitorCustomerSegmentIds[$websiteId]);
36+
$this->_customerSession->setCustomerSegmentIds($visitorCustomerSegmentIds);
37+
38+
return $this;
39+
diff --git a/vendor/magento/module-customer-segment/Model/Layout/DepersonalizePlugin.php b/vendor/magento/module-customer-segment/Model/Layout/DepersonalizePlugin.php
40+
index 8efa0f07e80c..da5eda4cd7d5 100644
41+
--- a/vendor/magento/module-customer-segment/Model/Layout/DepersonalizePlugin.php
42+
+++ b/vendor/magento/module-customer-segment/Model/Layout/DepersonalizePlugin.php
43+
@@ -115,13 +115,7 @@ public function afterGenerateElements(LayoutInterface $subject)
44+
) {
45+
$websiteId = $this->storeManager->getWebsite()->getId();
46+
$value = $this->customerSegmentIds[$websiteId] ?? [];
47+
-
48+
- if ($this->httpContext->getValue(Context::CONTEXT_AUTH)) {
49+
- $this->httpContext->setValue(Data::CONTEXT_SEGMENT, $value, []);
50+
- } else {
51+
- $this->httpContext->setValue(Data::CONTEXT_SEGMENT, $value, $value);
52+
- }
53+
-
54+
+ $this->httpContext->setValue(Data::CONTEXT_SEGMENT, $value, []);
55+
$this->customerSession->setCustomerSegmentIds($this->customerSegmentIds);
56+
}
57+
}

0 commit comments

Comments
 (0)