-
-
Save asifsomy/908f6934ee416cf9a99c to your computer and use it in GitHub Desktop.
Wordpress Magento Cross Integration
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
/* ===================================== */ | |
/* Add This to Wordpress's /wp-content/yourtheme/functions.php file */ | |
define('MAGENTO_ROOT', '/Volumes/Storage/www/heartandsun/store/'); | |
define('MAGENTO_LOADER', MAGENTO_ROOT.'app/Mage.php'); | |
if (!class_exists('Mage')) { | |
require_once(MAGENTO_LOADER); | |
umask(0); | |
Mage::app("default"); | |
}; | |
/* ===================================== */ |
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
/* ===================================== */ | |
/* Add This to Magento's /index.php file */ | |
if (strpos($_SERVER['REQUEST_URI'],'admin') == false && strpos($_SERVER['REQUEST_URI'],'media') == false) { | |
define('WORDPRESS_ROOT', '/home/thegreet/thegreetingfarm.com/html/staging/'); | |
define('WORDPRESS_LOADER', WORDPRESS_ROOT.'wp-load.php'); | |
require_once(WORDPRESS_LOADER); | |
}; | |
/* ===================================== */ |
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
/* ===================================== *//* | |
// # Copy /app/code/core/Mage/Core/functions.php to /app/code/local/Mage/Core/functions.php | |
// # and wrap the __() function in an if_exists to prevent conflicts between both platforms | |
// # translator functions. | |
*//* ===================================== */ | |
if (!function_exists('__')) { | |
function __() { return Mage::app()->getTranslator()->translate(func_get_args()); } | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment