Support » Plugin: Mage Enabler » [Plugin: Mage Enabler] Workaround for inability to edit Magento Products and Attribute Sets

  • Resolved John LeBlanc


    Aloha Richard and friends!

    I initially ran into issues while updating Products and Attribute Sets within Magento and When saving products, I’d receive “Decoding failed: Syntax error.” When saving attribute sets, I’d get “An error occurred while saving the attribute set.”

    I traced it back to a JSON decoding issue within app/code/core/Mage/Core/Helper/Data.php

    Meanwhile, it seemed as though the POST data looked totally cool.

    I beat myself up for a long while debugging themes, modules, database & server configs before realizing that it may be WordPress to blame and that WP functions need not be available within Magento admin.

    My solution: I modified Magento’s index.php to conditionally load WordPress:

    if ( strpos($_SERVER['REQUEST_URI'], 'index.php/admin') === FALSE )
        define('WP_USE_THEMES', false);

    You’ll want to modify the ‘index.php/admin’ portion to match a slice of your Magento Admin URL.

    I hope this is useful.

    Richard – Perhaps this might deserve a spot in your Install instructions?


Viewing 2 replies - 1 through 2 (of 2 total)
  • Stefan Boonstra


    The MageEnabler sounds like a lot of difficult in-code fixing which I think shouldn’t be necessary. This plugin: will enable you to show/advertise Magento products on your WordPress website without having to go into it’s source code and you are able to place it nearly anywhere on your website as a widget or a line of shortcode. It’s fully and easily customizable, of course.

    John, this worked like a charm. I agree, Richard should add this code to the install instructions.

    Stefan… I disagree. MageEnabler only requires a minimal amount of adjustment that doesn’t affect the core code. I’m building an entire store which uses the WordPress header, footer and styles throughout… even the checkout/customer pages!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Mage Enabler] Workaround for inability to edit Magento Products and Attribute Sets’ is closed to new replies.