Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SUPEE-9767 : EE FPC add to cart patch
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
You can’t perform that action at this time.