Wednesday, 15 April 2015

php - Magento Call to a member function setAttribute() on a non-object after adding 2 custom fields in address -


Using Magento 1.9.0.1, I added a module to insert 2 custom fields to find out. Please see the code in my second.

After installing the module, the billing address reveals this error:

Fatal error: call on a member function setAttribute () / home / onceecom / A non-object

in line 80 on public_html / dev / include / src / Mage_Eav_Model_Attribute_Data.php has not been modified to display new areas, but the error is already visible How can I debug such error?

{Var prefix}} to modify customer address display options. {{Depend}} {{dependent middlename}} {{var middlename}} {{depend}} {{var lastname}} {{dependent suffix}} {{var suffix}} {{depend }} & Lt; Br / & gt; {{Dependent company}} {{var company}} & lt; Br / & gt; {{/ Depend}} {{if street1}} {{var street1}} & lt; Br / & gt; {{/ If}} {{{{street}}} & lt; Br / & gt; {{Depend on 4th road} {{depend street}} {{var street2}} & lt; Br / & gt; {{/ Depend}} {} {{var street4}} & lt; Br / & gt; {{Dependent}} {{dependent chk_commercial}} {{var chk_commercial}} & lt; Br / & gt; {{Dependent}} {{dependent chk_residential}} {{var}} {} {{var}}} {{var}}} {{/ var}} {{if region}}, {{if region}} , {{If zone}}, {{/ If}} {{if postcode}} {{var postcode}} {{/ if}} & lt; Br / & gt; {{Var country}} & lt; Br / & gt; {{Dependent Telephone}} T: {{var telephones}} {{depend}} {{FailFix}} & lt; Br / & gt; F: {{var fax}} {{depend}} {{vat_id}} & lt; Br / & gt; VAT: {{var vat_id}} {{/ depend}}

chk_commercial and chk_residential are two fields that I have added. Deleting these 2 fields in the settings removes the no error.

I think I have found this problem. As Magento CE 1.9.0.1, the config.xml structure I used becomes invalid.

In this way, I use the following tools to reproduce the module:

Hope this helps others is.


No comments:

Post a Comment