custom/apps/MableSW6AppV2Int/Resources/views/logic/wgs-session-logic-v2-int.html.twig line 1

Open in your IDE?
  1. {% block wgs_session_logic_v2_int %}
  2.     {% set mableIdentifierKey = 'mable_identifier_int' %}
  3.     {% set env='int' %}
  4.     {% set mableIdentifierCookieKey = "wgs_ssn_id_" ~ env %}
  5.     {% set mableIdentifier = app.session.get(mableIdentifierKey) %}
  6.     {% set mableIdentifierCookieValue = app.request.cookies.get(mableIdentifierCookieKey) %}
  7.     {% if mableIdentifierCookieValue != mableIdentifier %}
  8.         {% do app.session.set(mableIdentifierKey, mableIdentifierCookieValue) %}
  9.         {% set mableIdentifier = mableIdentifierCookieValue %}
  10.     {% endif %}
  11.     <script>
  12.         window.wgs_ctx_uid_v2_int = '{{ mableIdentifier }}';
  13.     </script>
  14.     {% if page.order and mableIdentifier %}
  15.         <script>
  16.             ((uid,on)=>{const ss_script_url="{{ url('frontend.script_endpoint', {hook: 'wgsssnint-v2'}) }}";const parms={};if(uid){parms["mbssn"]=uid;}if(on){parms["on"]=on;}const urlParams=new URLSearchParams(parms);return fetch(ss_script_url+"?"+urlParams.toString(),{method:"GET",credentials:"include",});})( {{ mableIdentifier|json_encode()|raw }}, {{ page.order.id|json_encode()|raw }});
  17.         </script>
  18.     {% endif %}
  19. {% endblock %}