Hello, I followed the instruction of PBAs document about add new field on Customer Register with Placeholder. I already restarted PBAs service. But i don't know why it doesn't show on web shop view. I added new code in /var/opt/hspc-root/custom/EV/PlaceHolder.pm PHP: package HSPC::Custom::EV::PlaceHolder;use HSPC::PluginToolkit::General qw( string argparam log_debug log_warn);use strict;use constant PLACEHOLDERS=>{ customer.customextattribute=>{ method=>ext_attr, explain=>'Placeholder for custom extended attribute', is_vector=>0, obj_type_id=>'HSPC::MT::Core::Customer', def_value=>'test_value' }}sub ext_attr { my $account = shift; my $name = 'custom_ext_attribute'; log_debug("**** CALL ME ****"); require HSPC::MT::Core::ExtAttrFactory; my $value = HSPC::MT::Core::ExtAttrFactory->find_ext_attr( obj_type=>$account->obj_type_id(), obj_id =>$account->id(), name =>$name ); return $value;} Is there anyone can fix it ? Thanks.
Place holders used for email notification. if you need add fields to store you need create custom attributes: http://download.pa.parallels.com/pbas/4.5/doc/PBAS_SDK/custom_extended_attribute_code_sample.htm
Hello, Thank you for your support I have some question ? Where can i put this code ? Is this sample code for one-time run, to add new attribute to database ? And how can i add default custom extended attribute for all new customer ? Thanks
Yes it is one time script. By default you set up: $ext_attr_type->obj_types( [ {'obj_type' => &SW_OBJTYPE_CORE_HSP, 'default_value' => 'superboss' },