0

any help identifying the error will be highly appreciated.

on magento admin I getting the following error message when trying to access the payment methods. "Fatal error: Call to a member function isSandbox() on a non-object in Block/System/Config/Forms/Checkbox.php on line 13"

Here is the code for Checkbox.php:

class Paguelofacil_Pagocash_Block_System_Config_Forms_Checkbox extends Mage_Adminhtml_Block_System_Config_Form_Field
{
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
 $cvalue = Mage::getModel('Gateway/Config_Settings')->isSandbox();
 $checkActive = (Mage::getModel('Gateway/Config_Settings')->isSandbox()==1)?'checked':'';
 $html = "
 <input type='hidden' value='".$cvalue."' id='payment_Pagocash_sandbox' name='groups[Gateway][fields][sandbox][value]'>
 <input type='checkbox' class='select' onclick='pagueloFacilChange(this)' ".$checkActive."> Habilitado PagoCash Sandbox
 <script type='text/javascript'>
 function pfpagoCashChange(currentElement)
 {
 document.getElementById('payment_Pagocash_sandbox').value = (currentElement.checked)?1:0;
 }
 </script>
 ";
 //}
 return $html;
 }
}
Giel Berkers
12.4k7 gold badges80 silver badges125 bronze badges
asked May 17, 2017 at 14:34
1
  • This model Mage::getModel('Gateway/Config_Settings') is not part of magento core. Please post config.xml of the related module. Commented May 18, 2017 at 13:33

1 Answer 1

1

The method Mage::getModel('Gateway/Config_Settings') is returning null, meaning that Magento cannot resolve Gateway/Config_Settings to a Magento model.

Now it's been a while since I've worked with Magento 1, but my best guess is that your configuration path is incorrect (don't know if it's case-sensitive, so you could try gateway/config_settings, or that there is no such class in the module that is providing the gateway-namespace (typical path should be Vendor/Module/Model/Config/Settings.php).

answered May 17, 2017 at 14:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.