11:32 AM
0
Mặc định Magento chỉ cho phép edit một số attribute của customer ngoài frontend. Khi tạo mới attribute customer, mặc dụ đã có giá trị "is_visible=1" nhưng cũng không edit được attribute này ngoài frontend.
Để edit được:
  • truy cập bảng eav_attribute, tìm kiếm attribute này (theo attribute_code và entity_type_id, đối với customer, entity_type_id thường là 1), lấy gía trị attribute_id
  • Truy cập bảng customer_form_attribute. Có thể thấy trong cột form_code, là các phạm vi có thể edit được attribute.
  • Tìm attribute_id, xem đã có những phạm vi nào rồi, và thêm những phạm vi còn thiếu
  1. adminhtml_customer: edit trong admin 
  2. customer_address_edit: edit trong address (frontend) 
  3. customer_account_edit: edit trong account edit (frontend)
  4. customer_account_create : edit trong đăng ký tài khoản (frontend)

0 comments:

Post a Comment