Support » Plugin: Mage Enabler » [Plugin: Mage Enabler] Mage class not found

  • Hi Richard,

    I’ve installed the plugin, and the directory structure and such looks good. I’ve added the code to say, “Welcome, Guest”, to my index.php page, and that works. However, I cannot get the Mage class to show up for subsequent pages. For instance, when I tried the changes in wp-login.php, it complains that Mage class cannot be found. Printing out all of the classes shows that indeed, it is not there. Any ideas why this might be happening? I turned on E_ALL error reporting for wp-login.php, but it’s not reporting anything.

    Thanks,
    Chris using version 3.0.4

Viewing 4 replies - 1 through 4 (of 4 total)
  • Sorry, forgot to mention that I am using WAMP to run this, which hasn’t given me any problems up to this point, but maybe there are issues with it.

    Plugin Author Richard Feraro

    (@richardferaro)

    Hi, may I ask where did you place the code that generates the frontend cookie?

    if(class_exists('Mage')){
    	Mage::getSingleton('core/session', array('name' => 'frontend'));
    }

    If its in your header.php, remove it a place it in your theme’s index.php right before the get_header() call.

    I saw someone else with this problem in the comments of your blog and used his solution. I changed the line in mage-enabler.php that VinnyD mentioned in this blog post: http://mysillypointofview.richardferaro.com/2010/04/08/how-to-use-magentos-session-within-wordpress/#comment-2589

    Any idea if this is related to 3.0.4 or anything? It seems to be working well now, but I’m not sure if this is going to cause future issues or not. The lines that you mentioned were not in header.php, but were in index.php, so I think that was right.

    Plugin Author Richard Feraro

    (@richardferaro)

    It shouldn’t cause any problem if you’re gonna use a different hook as long as you double check your scripts if they’re doing well with the changes. I’ll see what could be the cause of this and make an update if necessary.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Mage Enabler] Mage class not found’ is closed to new replies.