Closed shihoradhruvi closed 6 years ago
Hi, Sorry not having responded before. How do you have added the custom customer attribute?
Best Regards, A.L.
Here is some informations about custom customer attributes.
It seems that custom customer attributes are not loaded in customer object data by Magento.
To access to a custom customer attribute, you should use the syntax below:
addMethod('local_pickup', [
'title' => "Local Pickup",
'description' => "Local Pickup",
'enabled' => $customer->getCustomAttribute('enable_localpickup')->value == '1',
'price' => 0,
]);
A.L.
Hello,
I want to use custom attribute of customer in condition but wont be able to use that. I tried using email attribute and that works but custom created attribute does not.
My configuration file include code as below,
addMethod('local_pickup', [ 'title' => "Local Pickup", 'description' => "Local Pickup", 'enabled' => $customer->enable_localpickup == '1', 'price' => 0 ]);
this does not work for me.
Can you please help me?