<% if (searchType == 'info') { %> <% $.each(results, function(index, value) { %> <% var item = value._source %>
  • <%= item.name %>

    <%= item.briefing %>

    <%= lang.read_more %>
  • <% }); %> <% } else { %> <% var currentSearchList = [] %> <% $.each(results, function(index, value) { %> <% var item = value._source if(item.study_cost.highest_price) { var itemPrice = item.study_cost.highest_price.full_price } else { var itemPrice = item.study_cost.full_price } var single = { 'item_name' : item.name, 'item_id' : item.id, 'item_category' : item.parent_name, 'item_list_name' : 'Search Results', 'price' : itemPrice, 'index' : index+1 } currentSearchList.push(single) %>
  • <% if (item.reviews_total>0){%>
      <% for(i = 0; i < item.reviews_rating; ++i){ %>
    • <% } %> <% for(i = 0; i < 5 - item.reviews_rating; ++i){ %>
    • <% } %>
    (<%=item.reviews_rating%>/5) <%= lang.reviews_box_title %>
        <% } %> <% if(item.study_feature_table.study_duration) {%> <%= lang.duration %>: <%= item.study_feature_table.study_duration * 16 %> <%= lang.months %>     <%}%> <% if(item.study_feature_table.study_points) {%> <%= lang.points %>: <%= item.study_feature_table.study_points %>     <%}%> <% if(item.study_feature_table.study_diploma) {%> <%= lang.diploma %>: <%= item.study_feature_table.study_diploma %> <%}%>

    <%= item.name %>

    <% if (_FEATURE_TOGGLE_NB_258 == '1') { %>

    <%= item.description %>

    <%}%>
    <% if(item.study_cost.highest_price) {%>
    <% if (item.study_cost.highest_price.old_price) { %> <%= item.study_cost.highest_price.old_price %> <%}%> <%= item.study_cost.highest_price.price %>
    <%}else{%>
    <%= item.study_cost.lowest_price.number_of_months %>x €<%= item.study_cost.lowest_price.price.replace(',00', ',-')%>
    <%}%> <%= lang.sign_in %>
  • <% }); %> <% var dataLayer = window.dataLayer = window.dataLayer || []; dataLayer.push({ 'event': 'view_item_list', 'ecommerce': { 'items': currentSearchList } }); %> <% } %> <% // this view is built from prepareSeachResults() in searchpage.js %>