Last active
June 8, 2017 07:26
-
-
Save cmtickle/477aba06d8d6a69148de542bfb56ed45 to your computer and use it in GitHub Desktop.
SUPEE-9767 : EE FPC add to cart patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app/code/core/Enterprise/PageCache/Model/Cookie.php | 1 + | |
app/code/core/Enterprise/PageCache/Model/Observer.php | 2 +- | |
2 files changed, 2 insertions(+), 1 deletion(-) | |
diff --git a/app/code/core/Enterprise/PageCache/Model/Cookie.php b/app/code/core/Enterprise/PageCache/Model/Cookie.php | |
index 8d6ef605c5..9979b763f3 100644 | |
--- a/app/code/core/Enterprise/PageCache/Model/Cookie.php | |
+++ b/app/code/core/Enterprise/PageCache/Model/Cookie.php | |
@@ -258,6 +258,7 @@ public static function getCategoryViewedCookieValue($id) | |
public static function setFormKeyCookieValue($formKey) | |
{ | |
setcookie(self::COOKIE_FORM_KEY, $formKey, 0, '/'); | |
+ $_COOKIE[self::COOKIE_FORM_KEY] = $formKey; | |
} | |
/** | |
diff --git a/app/code/core/Enterprise/PageCache/Model/Observer.php b/app/code/core/Enterprise/PageCache/Model/Observer.php | |
index 1bf219a557..ab0c02f9a7 100755 | |
--- a/app/code/core/Enterprise/PageCache/Model/Observer.php | |
+++ b/app/code/core/Enterprise/PageCache/Model/Observer.php | |
@@ -1041,7 +1041,7 @@ public function registerCachedFormKey(Varien_Event_Observer $observer) | |
/** @var $session Mage_Core_Model_Session */ | |
$session = Mage::getSingleton('core/session'); | |
$cachedFrontFormKey = Enterprise_PageCache_Model_Cookie::getFormKeyCookieValue(); | |
- if ($cachedFrontFormKey && !$session->getData('_form_key')) { | |
+ if ($cachedFrontFormKey) { | |
Mage::getSingleton('core/session')->setData('_form_key', $cachedFrontFormKey); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment