Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7013553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:24:11+00:00 2026-05-27T22:24:11+00:00

I am trying to read config data for a custom module to enable or

  • 0

I am trying to read config data for a custom module to enable or disable it based on the config setting. I am trying to read the config data in an Observer like this : $module_state = Mage::helper('stopcheckout')->moduleActive(); and here is my helper. My observer gets called when ever a product is added to cart. But i get a blank page when i try to read the config data with the above snipped of code. Here are the config.xml and system.xml files. Where am i going wrong? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:24:12+00:00Added an answer on May 27, 2026 at 10:24 pm

    Your helper method is not correct, as I’m sure you’ve guessed 🙂

    Try this:

    <?php
    class Foostor_Stopcheckout_Helper_Data extends Mage_Core_Helper_Abstract
    {
        /**
         * Check if the extension has been disabled in the system configuration
         */
        public function moduleActive()
        {
            return ! (bool) Mage::getStoreConfigFlag('catalog/stopcheckout/disable_ext');
        }
    }
    

    The getStoreConfigFlag() method always returns a boolean. It evaluates the strings “false” and “0” as false, so this is appropriate because the adminhtml/system_config_source_yesno source model uses 1 and 0 as the stored values.

    The parameter that is passed for values set via system.xml fields will always have three parts: one for the <sections> node, one for the <groups> node, and one for the <fields> node.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a config that would look something like this: nods
I'm trying to create classes to read from my config file using ConfigurationSection and
I am trying to create a custom table using custom module. I have been
I am trying to read dataSource ad Catalog from <connectionStrings> in web.config in Silverlight
I am trying to read data from properties file.I have specified the path in
I am trying to read data from a HID device. I have a USB
Trying to read an RSS and select information using Linq but can't seem to
Trying to read headers for a csv file with: reader = csv.DictReader(open(PATH_FILE),skipinitialspace=True) headers =
I'm currently trying to read in an XML file, make some minor changes (alter
I'm trying to read through the documentation on Berkeley DB XML , and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.