{"id":9113,"date":"2010-05-12T06:13:15","date_gmt":"2010-05-12T06:13:15","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/mage-enabler\/"},"modified":"2012-09-19T18:58:45","modified_gmt":"2012-09-19T18:58:45","slug":"mage-enabler","status":"publish","type":"plugin","link":"https:\/\/bal.wordpress.org\/plugins\/mage-enabler\/","author":5972802,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.2.2","stable_tag":"1.2.2","tested":"3.4.2","requires":"2.9.2","requires_php":"","requires_plugins":"","header_name":"Mage Enabler","header_author":"Richard Feraro","header_description":"","assets_banners_color":"","last_updated":"2012-09-19 18:58:45","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=A4YNMXBEXWQWA","header_plugin_uri":"http:\/\/mysillypointofview.richardferaro.com\/2010\/05\/11\/mage-enabler\/","header_author_uri":"http:\/\/www.richardferaro.com","rating":0,"author_block_rating":0,"active_installs":20,"downloads":7033,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.2.2":"<p>This fixes the bug which produces a fatal error or blank screen (for those with error_reporting turned off) in view.php for css and image url.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.1.1","1.2","1.2.1","1.2.2"],"block_files":[],"assets_screenshots":{"screenshot-5.png":{"filename":"screenshot-5.png","revision":"1538966","resolution":"5","location":"plugin"},"screenshot-4.png":{"filename":"screenshot-4.png","revision":"1538966","resolution":"4","location":"plugin"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1538966","resolution":"2","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1538966","resolution":"3","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1538966","resolution":"1","location":"plugin"}},"screenshots":{"1":"Folder structure in installing the plugin","2":"Mage Enabler running in WordPress version 2.9.2","3":"Mage Enabler running in WordPress version 3.0-beta1","4":"Mage Enabler running in WordPress version 3.0-beta2","5":"Mage Enabler running in WordPress version 3.0 'Thelonious'"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[282,41655,5348,14950],"plugin_category":[45],"plugin_contributors":[85637],"plugin_business_model":[],"class_list":["post-9113","plugin","type-plugin","status-publish","hentry","plugin_tags-ecommerce","plugin_tags-mage","plugin_tags-magento","plugin_tags-session","plugin_category-ecommerce","plugin_contributors-richardferaro","plugin_committers-richardferaro"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/mage-enabler.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/mage-enabler\/trunk\/screenshot-1.png?rev=1538966","caption":"Folder structure in installing the plugin"},{"src":"https:\/\/ps.w.org\/mage-enabler\/trunk\/screenshot-2.png?rev=1538966","caption":"Mage Enabler running in WordPress version 2.9.2"},{"src":"https:\/\/ps.w.org\/mage-enabler\/trunk\/screenshot-3.png?rev=1538966","caption":"Mage Enabler running in WordPress version 3.0-beta1"},{"src":"https:\/\/ps.w.org\/mage-enabler\/trunk\/screenshot-4.png?rev=1538966","caption":"Mage Enabler running in WordPress version 3.0-beta2"},{"src":"https:\/\/ps.w.org\/mage-enabler\/trunk\/screenshot-5.png?rev=1538966","caption":"Mage Enabler running in WordPress version 3.0 'Thelonious'"}],"raw_content":"<!--section=description-->\n<p>This plugin links your Magento installation and WordPress by instantiating the Magento's Mage object. It is done by using PHP <code>require_once<\/code> of the file <code>Mage.php<\/code> supplied by Magento. By doing this, the administrator will be able to pull and push information to\/from the Magento. This requires a working Magento setup prior to installation of this plugin. At the moment, Mage object can be used to non-admin pages such as themes.<\/p>\n\n<h4>Is this plugin for you?<\/h4>\n\n<p>If you know how to program using PHP with basic knowledge of object oriented programming and familiar with Magento, then yes, this plugin is for you. The plugin, once activated, gives you a raw access to the Mage object which you can use to access Magento methods within WordPress and do stuff like <a href=\"http:\/\/mysillypointofview.richardferaro.com\/2010\/04\/08\/how-to-use-magentos-session-within-wordpress\/\">single login<\/a>, <a href=\"http:\/\/mysillypointofview.richardferaro.com\/2010\/07\/03\/how-to-add-magento-blocks-css-and-javascript-to-an-external-site\/\">pull templates from Magento<\/a>, display categories, <a href=\"http:\/\/mysillypointofview.richardferaro.com\/2010\/06\/04\/add-a-product-with-custom-options-into-magento-cart-from-external-site\/\">products<\/a> and checkout from your blog and many <a href=\"http:\/\/docs.magentocommerce.com\/\">more<\/a>. It's basically extending the ecommerce function of Magento to your WordPress blog.<\/p>\n\n<h4>This plugin is not for you if:<\/h4>\n\n<ul>\n<li>You want to display your WordPress blog within your Magento shop (Go to Magento Connect instead)<\/li>\n<li>You don't know how to program using PHP<\/li>\n<li>You have no idea what Magento is<\/li>\n<\/ul>\n\n<p>Please do take some time to rate the plugin as well as fill in the information needed in the compatibility section. It would be great if you can share your site (only if you're allowed to do so) which uses this plugin but it is optional though.<\/p>\n\n<!--section=installation-->\n<ol>\n<li><p>Fix the function collision problem between Magento and WordPress by doing the following:<\/p>\n\n<p>Copy the file <code>functions.php<\/code> from your Magento core folder which can be found in:<\/p>\n\n<pre><code>    \/magento\/app\/code\/core\/Mage\/Core\/functions.php \n<\/code><\/pre>\n\n<p>and paste it in the directory below (create the directory if necessary) and open the file for editing.<\/p>\n\n<pre><code>    \/magento\/app\/code\/local\/Mage\/Core\/functions.php\n<\/code><\/pre>\n\n<p>Locate the <code>function __()<\/code> or go to line 93. The function is similar to the one below:<\/p>\n\n<pre><code>    function __() \n    { \n        return Mage::app()-&gt;getTranslator()-&gt;translate(func_get_args()); \n    }\n<\/code><\/pre>\n\n<p>replace it with this:<\/p>\n\n<pre><code>    if (!function_exists('__')) {\n        function __()\n        {\n        return Mage::app()-&gt;getTranslator()-&gt;translate(func_get_args());\n        }\n    }\n<\/code><\/pre>\n\n<p>Save the file and close it.<\/p><\/li>\n<li>Upload <code>mage-enabler<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory or use the <code>Add New -&gt; Upload<\/code> option in the Administration panel.<\/li>\n<li>If you use FTP to upload the plugin, activate the plugin through the 'Plugins' menu in WordPress. If you use the <code>Add New -&gt; Upload<\/code> option, just click the Activate link provided after the plugin's installation. A menu will be added under <code>Settings<\/code> tab labeled as <code>Mage Enabler<\/code>.<\/li>\n<li>Go to the Mage Enabler admin page in WordPress and supply the absolute URL of the file <code>Mage.php<\/code> from Magento<\/li>\n<li>Click Save button. One of the messages below will shows upon saving the settings:\n\n<ul>\n<li>Invalid URL - This means your file <code>Mage.php<\/code> can't be found using the URL you entered.<\/li>\n<li>File is accessible! - You have supplied a valid URL.<\/li>\n<li>Mage object not found! - Check your cookie settings. Your browser should be configured to accept cookies.<\/li>\n<\/ul><\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How to use this plugin?<\/dt>\n<dd><p>Check my blog for an example <a href=\"http:\/\/mysillypointofview.richardferaro.com\/2010\/05\/11\/mage-enabler\/\">here<\/a><\/p><\/dd>\n<dt>What Magento methods can I use?<\/dt>\n<dd><p>Check the <a href=\"http:\/\/docs.magentocommerce.com\/\">Magento documentation<\/a><\/p><\/dd>\n<dt>My website appears blank after I turn on the plugin<\/dt>\n<dd><p>It means there's an error in your code. Set your PHP error_reporting to E_ALL and refresh the page so you can see what's causing the error.<\/p><\/dd>\n<dt>I already set my PHP error reporting to display all errors in .htaccess but still my page remains blank<\/dt>\n<dd><p>Try placing the <code>error_reporting(E_ALL)<\/code> without quotes at the top of the actual file you're working on then reload the page.<\/p><\/dd>\n<dt>I get 'Cannot send session cookie - headers already sent by...' error<\/dt>\n<dd><p>Try placing your <code>Mage::getSingleton(...)<\/code> call at the top of your PHP file to prevent this error from taking place.<\/p><\/dd>\n<dt>I'm getting the 'The plugin does not have a valid header' error<\/dt>\n<dd><p>Check the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/mage-enabler\/screenshots\/\">screenshots<\/a> area on how to setup the folder structure properly<\/p><\/dd>\n<dt>I'm getting a 'Decoding failed: Syntax error' or 'An error occurred while saving the attribute set'<\/dt>\n<dd><p>You might wanna take a look at what <a href=\"http:\/\/wordpress.org\/support\/profile\/johnleblanc\">John LeBlanc<\/a> did <a href=\"http:\/\/wordpress.org\/support\/topic\/plugin-mage-enabler-workaround-for-inability-to-edit-magento-products-and-attribute-sets?replies=3\">here<\/a>.\nThanks John :)<\/p><\/dd>\n<dt>My question isn't answered here<\/dt>\n<dd><p>Please post it to the <a href=\"http:\/\/wordpress.org\/tags\/mage-enabler\/\">WordPress support forum<\/a> and tag your post with \"mage-enabler\".<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>Fixed: Fatal error or blank screen (for those with error_reporting turned off) when determining the plugin url in <code>view.php<\/code> file.<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Fixed: Sample and Related Posts not appearing due to <code>simplexml_load_file()<\/code> not allowed by default server configuration.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Changed: Moved the Mage Enabler tab to <code>Settings -&gt; Mage Enabler<\/code><\/li>\n<li>Fixed: Fatal error when no 'default' store code is configured <a href=\"http:\/\/mysillypointofview.richardferaro.com\/2010\/05\/11\/mage-enabler\/#comment-659\">see comment #659<\/a><\/li>\n<li>Updated: Page layout and added reference for examples and related posts<\/li>\n<li>Added: Auto-detect store configuration<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Fixed fatal error during xmlrpc calls <a href=\"http:\/\/mysillypointofview.richardferaro.com\/2010\/05\/11\/mage-enabler\/#comment-417\">see comment #417<\/a>. Thanks <a href=\"http:\/\/lexiamatic.wordpress.com\">mik<\/a> for the feedback.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Fixed fatal error when URL value provided is a directory<\/li>\n<li>Added WordPress 3.0 screenshot-5.png sample output<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial commit for Mage Enabler plugin<\/li>\n<\/ul>","raw_excerpt":"A plugin which enables Magento&#039;s session to run within WordPress.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/9113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=9113"}],"author":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/richardferaro"}],"wp:attachment":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=9113"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=9113"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=9113"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=9113"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=9113"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=9113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}