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 7494361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:29:52+00:00 2026-05-29T17:29:52+00:00

I am developing a payment method module in Magento. When I click payment methods

  • 0

I am developing a payment method module in Magento. When I click payment methods menu in Configuration of Magento I get the below error

Fatal error: Call to a member function toOptionArray() on a non-object in
\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\Block\System\Config\Form.php
on line 421

Please see the below link for the code of module which I was developing

Magento module Fatal error: Class 'Mage_Cashondelivery_Helper_Data' not found in \xampp\htdocs\magento\app\Mage.php on line 516

I am using Xampp 1.7.3 and magento 1.6.1.
Please help.

  • 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-29T17:29:54+00:00Added an answer on May 29, 2026 at 5:29 pm

    In your system.xml you have the following code

    <payment_action translate="label">
        <label>Payment Action</label>
        <frontend_type>select</frontend_type>
        <source_model>cashondelivery/createorder</source_model>
        <sort_order>2</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>0</show_in_store>
    </payment_action>
    

    The source model is specified as cashondelivery/createorder.
    According to the code you posted in the question you reference, this class is a payment method model, not a source model.
    If you implement the toOptionArray() method on the model it would work as a system config source model as well, but that doesn’t seem like a bad choice.
    I would guess the source model you are looking for is something like paygate/authorizenet_source_paymentAction.

    Background

    Source models in Magento exist to provide option lists to select and multiselects. For this purpose they implement the toOptionArray() method.
    The options are returned as an array that has the following format:

    public function toOptionArray()
    {
        return array(
            array('value' => $value1, 'label' => 'The label for option 1'),
            array('value' => $value2, 'label' => 'The label for option 2'),
            array('value' => $value3, 'label' => 'The label for option 3')
            // ... etc ...
        );
    }
    

    System configuration source models don’t need to extend super class and don’t need to implement any methods besides toOptionArray().
    EAV select and multiselect attributes also make use of source models, but those need to extend eav/entity_attribute_source_abstract and are more complex, so I’ll won’t go into more details at this place.

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

Sidebar

Related Questions

I am developing a payment Module for Magento. I did this using this tutorial
I am developing a payment module. I don't find proper documentation anywhere for Magento
Developing a website and just trying to get back into the swing of (clever)
NOTE: I'm developing for Mac, not iOS! - (void)recordTransaction:(SKPaymentTransaction *)transaction { if ([transaction.payment.productIdentifier isEqualToString:kInAppProIdentifier])
I am developing an e-commerce website, I want payment process to be done from
I'm developing a lightweight e-commerce solution that uses PayPal as the payment gateway. However,
we are developing a kind of payment processing site that is currently running on
Developing a module for drupal and I need to pass/modify variables within functions. I
I'm developing a small webshop that should have some payment options. My platform is
Gday All, I am developing a site that uses PayPal to take online payments.

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.