I've recently upgraded to Magento 1.4.2.0. I have a simple custom module for keeping track of salesreps on customers and orders. Until the upgrade, it worked great, but magento 1.4.2.0 changed the way customer attributes are handled in the admin, The attribute needs to be in the customer_开发者_开发技巧form_attribute table. I've run the code from this post to add the attribute to adminhtml_customer which restored the field on the customer account page, but when I added it to adminhtml_checkout it did not show up on the backend order creation page.
I can confirm the attribute IS being loaded into the $data array, and when creating an order for a customer with a salerep already assigned the salerep is copied to the quote, order, etc. but the dropdown just isn't showing up on the order creation page. And of course I checked that the fields are indeed in customer_form_attribute.
Do I need to add this to the customer forms in customer_form_attribute (customer_account_create, customer_account_edit, etc?), or should this be working as is?
Well, I've solved the problem. The answer to my last question is that yes, it should have been working as-is. My attribute didn't show up because the attribute had user_defined set to 0. Previously this didn't prevent the attribute from showing in admin, but apparently that changed between 1.4.1.1 and 1.4.2.0. I set it to 1, and the attribute showed right up where it was supposed to.
精彩评论