Blesta Addons Posted December 1, 2014 Report Posted December 1, 2014 i want to include the package name in the welcome email , wich tag should i use ? {package.name} ? the second question , is possible to add a returned data service creation in the welcome email tags without saving this data ? exemple , in module addservice , i have the returned data from $response , the returned data has a lot of keys , and i want just to save 2 keys in the service field , and i want to use two more others key in welcome email tags without saving them in service fields . // Return service fields return array( array( 'key' => "my_data", 'value' => (isset($response->my_data) ? $response->my_data : (!empty($vars['my_data']) ? $vars['my_data'] : null)), 'encrypted' => 0 ), array( 'key' => "ip_address", 'value' => isset($response->ipaddress) ? $response->ipaddress : null, 'encrypted' => 0 ) ); is this possible ?
Michael Posted December 1, 2014 Report Posted December 1, 2014 Yes mate {package.name} is the package name Blesta Addons 1
Tyson Posted December 1, 2014 Report Posted December 1, 2014 The welcome email only has access to service fields that are saved. So if you want to send those other two fields, they need to be saved for the service. If they are not service-specific, you could set them on the package or module instead, if that would make sense for you to do. Blesta Addons 1
Blesta Addons Posted December 1, 2014 Author Report Posted December 1, 2014 Yes mate {package.name} is the package name The welcome email only has access to service fields that are saved. So if you want to send those other two fields, they need to be saved for the service. If they are not service-specific, you could set them on the package or module instead, if that would make sense for you to do. thanks for the reply . Michael 1
Blesta Addons Posted December 25, 2014 Author Report Posted December 25, 2014 another question to add . i have a field in service that has a value as array , what is the correct way/format to print the value of this field in the welcome email ? array( 'key' => "options", 'value' => array( 'options1' => "options1", 'options2' => "options2", 'options3' => "options3" ), 'encrypted' => 0 ) is this should work {service.options.options1} or {service.options['options1']} ?
Tyson Posted December 26, 2014 Report Posted December 26, 2014 another question to add . i have a field in service that has a value as array , what is the correct way/format to print the value of this field in the welcome email ? array( 'key' => "options", 'value' => array( 'options1' => "options1", 'options2' => "options2", 'options3' => "options3" ), 'encrypted' => 0 ) is this should work {service.options.options1} or {service.options['options1']} ? The first way is the correct format: {service.options.options1} Blesta Addons 1
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now