Created
October 12, 2016 09:52
-
-
Save wpalmer/8ac6bcf7c57c645e4e2c3163cc09b006 to your computer and use it in GitHub Desktop.
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
From 443bd2f22db090019e3f49676890a57e947a56ac Mon Sep 17 00:00:00 2001 | |
From: Will Palmer <will@do-it-well.co.uk> | |
Date: Wed, 12 Oct 2016 10:43:19 +0100 | |
Subject: [PATCH] [TEMPORARY FIX] bind criteo late, to fix filters | |
Criteo's observer, which iterates over products, was bound to the event | |
controller_action_layout_load_before. This was a problem because Layered | |
Navigation is applied during the layout load, in: | |
core/Mage/Catalog/Block/Layer/View.php#_prepareLayout() | |
Because Criteo caused the list of products to be iterated early, this | |
meant the additional conditions from Layered Navigation were never set | |
on the collection. | |
Changing the observer to bind to controller_action_layout_load_after | |
seems to correct this, and I haven't spotted anything in Criteo which | |
looks like it requires the observer be bound any earlier, so this may be | |
a viable solution. | |
We are presently discussing with Criteo to get this change merged | |
upstream. As it is anticipated that this will be eventually merged, we | |
have applied this change directly to their module, for now. | |
--- | |
htdocs/app/code/community/Criteo/OneTag/etc/config.xml | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/htdocs/app/code/community/Criteo/OneTag/etc/config.xml b/htdocs/app/code/community/Criteo/OneTag/etc/config.xml | |
index 6a10888..b394f3d 100644 | |
--- a/htdocs/app/code/community/Criteo/OneTag/etc/config.xml | |
+++ b/htdocs/app/code/community/Criteo/OneTag/etc/config.xml | |
@@ -12,7 +12,7 @@ | |
</criteo_onetag_parameters> | |
</models> | |
<events> | |
- <controller_action_layout_load_before> | |
+ <controller_action_layout_load_after> | |
<observers> | |
<Criteo_OneTag_Model_Page_Observer> | |
<type>singleton</type> | |
@@ -20,7 +20,7 @@ | |
<method>setCriteoParameters</method> | |
</Criteo_OneTag_Model_Page_Observer> | |
</observers> | |
- </controller_action_layout_load_before> | |
+ </controller_action_layout_load_after> | |
</events> | |
<blocks> | |
<onetag_block> | |
-- | |
2.7.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment