Published on : May 22, 2020
URL :
https://loantap.in/dummy-app/sample-ps.end_uses
Service Description : Fetch end uses based on job type.
Input :
Job Type (Mandatory)
Usage :
[product_services.get-taxonomy.end_uses job_type="<JOB-TYPE>" o.set=template.end_uses /]
Logic :
- Declare the array of end use with each will contain the following params:
- name : End Use Label
- slug : Value of end use
- icon_url : Image of end use
- end_use_desc : Description of end use
- Fetch the common end use and store in variable common.
- Check for the provided job type and fetch the end use specific to the provided job type and store in variable job_specific.
- Merge the array common with job_specific and return the same.
Sample Output :
array(8)
[
0 => array(4)
[
"name" => string(17) "Travel or Holiday"
"slug" => string(17) "travel-or-holiday"
"icon_url" => string(63) "https://images.loantap.in/uploads/end-use/travel-or-holiday.svg"
"end_use_desc" => string(17) "Travel or Holiday"
]
1 => array(4)
2 => array(4)
3 => array(4)
4 => array(4)
5 => array(4)
6 => array(4)
7 => array(4)
]