0

I'm trying to get custom customer attribute value (for attribute code abn_no) without loading the customer but not able to find any way to get it.

Is there any way to get custom customer attribute value without loading the customer?

3
  • from where you want to get the attribute value, Observer, or any custom file where customers object is available..? Mar 23 at 11:26
  • i want it in my custom file. if the customer is login then i want to get attribute value of that customer, but i dont want to load the entire customer. Mar 24 at 3:53
  • Have you got solution ?
    – Msquare
    Mar 31 at 13:27

1 Answer 1

1

This is not correct method but you have asked the question I answered it.

1st method:

You can load the attribute's value by attribute's code/Id(static) with customer id(dynamic get from session). For this you have to run raw SQL for the respected attribute table like "customer_entity_varchar". Note: Attribute Id can change respected to deploy environment.

2nd Method: This method is bit more correct one, you can set value in session of customer after login as you said.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.