简体   繁体   English

致命错误:在magento中的非对象上调用成员函数getEmail()

[英]Fatal error: Call to a member function getEmail() on a non-object in magento

I need to create vendor registration from for our vendor. 我需要为我们的供应商创建供应商注册。 How to create Form helper in custom form 如何在自定义窗体中创建窗体助手

<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
<ul>
<li class="fields">

                </li>
                <li>
                    <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
                    <div class="input-box">
                        <input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
                    </div>
                </li>
</ul>
</form>

I m getting error Fatal error: Call to a member function getEmail() on a non-object I need to know how can i crete form object in magento... 我遇到错误致命错误:在非对象上调用成员函数getEmail()我需要知道如何在magento中创建表单对象...

In this case getFormData() just returns the Model or Helper which owns the function getEmail() 在这种情况下, getFormData()仅返回拥有函数getEmail()的Model或Helper。

So just create a Block class with the function getFormData() and create a Helper class which owns the getEmail() function. 因此,只需使用getFormData()函数创建一个Block类,并创建一个拥有getEmail()函数的Helper类。

HTH 高温超导

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Magento:致命错误:在非对象上调用成员函数 getMethodInstance() - Magento : Fatal error: Call to a member function getMethodInstance() on a non-object Magento致命错误-在非对象上调用成员函数getId() - Magento Fatal Error - Call to a member function getId() on a non-object Magento致命错误:在非对象上调用成员函数save() - Magento Fatal error: Call to a member function save() on a non-object 致命错误:在Magento中的非对象上调用成员函数getIdFieldName() - Fatal error: Call to a member function getIdFieldName() on a non-object in Magento 致命错误:在 magento 中的非对象上调用成员函数 getLevel() - Fatal error: Call to a member function getLevel() on a non-object in magento Magento:致命错误:在非对象上调用成员函数 load() - Magento: Fatal error: Call to a member function load() on a non-object Magento致命错误:在非对象上调用成员函数addFieldToFilter() - Magento Fatal error: Call to a member function addFieldToFilter() on a non-object Magento致命错误:在非对象上调用成员函数getSku() - Magento Fatal Error: Call to member function getSku() on a non-object Magento:致命错误:在非对象上调用成员函数getItems() - Magento: Fatal error: Call to a member function getItems() on a non-object Magento遇到此错误:致命错误:在非对象上调用成员函数getAttributeText() - Magento getting this error: Fatal error: Call to a member function getAttributeText() on a non-object
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM