Skip to content

Instantly share code, notes, and snippets.

@molotovbliss
Created May 22, 2012 04:22
Show Gist options
  • Select an option

  • Save molotovbliss/2766535 to your computer and use it in GitHub Desktop.

Select an option

Save molotovbliss/2766535 to your computer and use it in GitHub Desktop.
Fix for Fooman GoogleAnalytics Plus not working in 1.7 CE, 1.11 EE.
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- 991
+++ 992
@@ -62,7 +62,8 @@
$success = false;
}
- if (version_compare(Mage::getVersion(), '1.4.1.1') > 0 && version_compare(Mage::getVersion(), '1.7.0.0') < 0) {
+ // Fix for invalid version detection as well as forward compatibility
+ if (version_compare(Mage::getVersion(), '1.4.1.1') > 0) {
//Mage 1.4.2 +
$new = true;
if (!Mage::helper('googleanalytics')->isGoogleAnalyticsAvailable()) {
@fooman
Copy link
Copy Markdown

fooman commented Jun 7, 2012

Thanks for the patch. The next version will include this to equally work on EE:

- if (version_compare(Mage::getVersion(), '1.4.1.1') > 0 && version_compare(Mage::getVersion(), '1.7.0.0') < 0) {
+ $helper = Mage::helper('googleanalytics');        
+ if (method_exists($helper, 'isGoogleAnalyticsAvailable')) {

@molotovbliss
Copy link
Copy Markdown
Author

No problem, thanks for the work on the great module BTW!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment