templates/layout/partials/js-config.html.twig line 1

Open in your IDE?
  1. {# add default jsConfig stuff here... e.g. cookiebar #}
  2. {% set locale = app.request.locale %}
  3. {% do jsConfig().add({
  4.     'lang': locale,
  5.     'admin': editmode ? true : false,
  6.     'local': locale,
  7.     'localeRegion': locale ~ '-' ~ locale|upper,
  8. }) %}
  9. {# Translations #}
  10. {% do jsConfig('_translations').add({
  11.     'alert-notification.generic-error': 'Oops. Something went wrong. Please try again.'|trans,
  12.     'alert-notification.close': 'Close'|trans,
  13.     'shop.configuration.add-to-cart':'shop.configuration.add-to-cart'|trans,
  14.     'general.sr-close':'general.sr-close'|trans,
  15.     'general.loading-error':'general.loading-error'|trans,
  16.     'general.close':'general.close'|trans,
  17.     'shop.configuration.optional':'shop.configuration.optional'|trans,
  18.     'shop.configuration.breadcrumb.Date':'shop.configuration.breadcrumb.Date'|trans,
  19.     'shop.configuration.breadcrumb.Edit-date':'shop.configuration.breadcrumb.Edit-date'|trans,
  20.     'shop.configuration.breadcrumb.to':'shop.configuration.breadcrumb.to'|trans,
  21.     'shop.configuration.breadcrumb.Edit-configuration':'shop.configuration.breadcrumb.Edit-configuration'|trans,
  22.     'shop.calendar.prev-button':'shop.calendar.prev-button'|trans,'shop.calendar.prev-button':'shop.calendar.prev-button'|trans,
  23.     'shop.configuration.date.fully booked':'shop.configuration.date.fully booked'|trans,
  24.     'shop.configuration.date.available':'shop.configuration.date.available'|trans,
  25.     'shop.configuration.date.dates available':'shop.configuration.date.dates available'|trans,
  26.     'shop.configuration.ticket.available spaces':'shop.configuration.ticket.available spaces'|trans,
  27.     'shop.configuration.ticket.age-group':'shop.configuration.ticket.age-group'|trans,
  28.     'shop.configuration.ticket.sum-of-persons':'shop.configuration.ticket.sum-of-persons'|trans,
  29.     'shop.configuration.ticket.price-per-unit':'shop.configuration.ticket.price-per-unit'|trans,
  30.     'shop.configuration.ticket.sum':'shop.configuration.ticket.sum'|trans,
  31.     'shop.configuration.total-price':'shop.configuration.total-price'|trans,
  32.     'Shop.ticket-config.choose-person':'Shop.ticket-config.choose-person'|trans,
  33.     'shop.configuration.add-person':'shop.configuration.add-person'|trans,
  34.     'shop.configuration.price':'shop.configuration.price'|trans,
  35.     'shop.configuration.ticket.choose-one-of-the-following-options':'shop.configuration.ticket.choose-one-of-the-following-options'|trans,
  36.     'shop.configuration.ticket.configure-ticket':'shop.configuration.ticket.configure-ticket'|trans,
  37.     'shop.configuration.ticket.for-more-infos-click-info-icon':'shop.configuration.ticket.for-more-infos-click-info-icon'|trans,
  38.     'shop.configuration.ticket.prices-are-for-one':'shop.configuration.ticket.prices-are-for-one'|trans,
  39.     'shop.ticket.No-insurance':'shop.ticket.No-insurance'|trans,
  40.     'shop.configuration.ticket.sold out':'shop.configuration.ticket.sold out'|trans,
  41.     'general.loading':'general.loading'|trans,
  42.     'Shop.is-loading':'Shop.is-loading'|trans,
  43.     'shop.configuration.Close':'shop.configuration.Close'|trans,
  44.     'general.go-back':'general.go-back'|trans,
  45.     'shop.configuration.total':'shop.configuration.total'|trans,
  46.     'Shop.configuration.select-currency':'Shop.configuration.select-currency'|trans,
  47.     'shop.configuration.save & next':'shop.configuration.save & next'|trans,
  48.     'shop.activities.price-tendency.capacity & price-tendency description':'shop.activities.price-tendency.capacity & price-tendency description'|trans,
  49.     'shop.activities.price-tendency.capacity & price-tendency info':'shop.activities.price-tendency.capacity & price-tendency info'|trans,
  50.     'shop.configuration.Price-per-Adult':'shop.configuration.Price-per-Adult'|trans,
  51.     'shop.price-tendency.capacity & pricetendency':'shop.price-tendency.capacity & pricetendency'|trans,
  52.     'shop.price-tendency.capacity & pricetendency.description':'shop.price-tendency.capacity & pricetendency.description'|trans,
  53.     'shop.price-tendency.capacity & pricetendency.short-description':'shop.price-tendency.capacity & pricetendency.short-description'|trans,
  54.     'shop.ticket.* Prices refer to adult day tickets':'shop.ticket.* Prices refer to adult day tickets'|trans,
  55.     'shop.configuration.choose-date':'shop.configuration.choose-date'|trans,
  56.     'shop.configuration.choose-date-in-calendar':'shop.configuration.choose-date-in-calendar'|trans,
  57.     'shop.configuration.choose-persons':'shop.configuration.choose-persons'|trans,
  58.     'shop.configuration.add-persons-from-age-groups':'shop.configuration.add-persons-from-age-groups'|trans,
  59.     'shop.configuration.tickets':'shop.configuration.tickets'|trans,
  60.     'shop.configuration.ticket':'shop.configuration.ticket'|trans,
  61.     'shop.configuration.cart':'shop.configuration.cart'|trans,
  62.     'shop.configuration.checkout':'shop.configuration.checkout'|trans,
  63.     'shop.configuration.continue-shopping':'shop.configuration.continue-shopping'|trans,
  64.     'shop.configuration.choose-rides':'shop.configuration.choose-rides'|trans,
  65.     'shop.configuration.choose-date-in-calendar':'shop.configuration.choose-date-in-calendar'|trans,
  66.     'shop.configuration.persons':'shop.configuration.persons'|trans,
  67.     'shop.configuration.add-persons-from-profile':'shop.configuration.add-persons-from-profile'|trans,
  68.     'shop.configuration.add-persons-from-age-groups':'shop.configuration.add-persons-from-age-groups'|trans,
  69.     'shop.configuration.configure-ticket':'shop.configuration.configure-ticket'|trans,
  70.     'shop.configuration.ticket-configuration':'shop.configuration.ticket-configuration'|trans,
  71.     'shop.configuration.price-per':'shop.configuration.price-per'|trans,
  72.     'shop.configuration.select-price-group':'shop.configuration.select-price-group'|trans,
  73.     'shop.configuration.verify-tickets':'shop.configuration.verify-tickets'|trans,
  74.     'Shop.configuration.age-group':'Shop.configuration.age-group'|trans,
  75.     'Shop.configuration.insurance':'Shop.configuration.insurance'|trans,
  76.     'shop.configuration.edit-person':'shop.configuration.edit-person'|trans,
  77.     'shop.configuration.delete-person':'shop.configuration.delete-person'|trans,
  78.     'shop.configuration.change-ticket-configuration-for':'shop.configuration.change-ticket-configuration-for'|trans,
  79.     'shop.configuration.cancel':'shop.configuration.cancel'|trans,
  80.     'shop.configuration.save':'shop.configuration.save'|trans,
  81.     'general.required':'general.required'|trans,
  82.     'shop.configuration.persons-view':'shop.configuration.persons-view'|trans,
  83.     'shop.configuration.summary-view':'shop.configuration.summary-view'|trans,
  84.     'shop.configuration.calendar-view':'shop.configuration.calendar-view'|trans,
  85.     'shop.configuration.time-list-view':'shop.configuration.time-list-view'|trans,
  86.     'Shop.configuration.validation.time-list':'shop.configuration.validation.time-list'|trans,
  87.     'Shop.configuration.validation.calendar':'shop.configuration.validation.calendar'|trans,
  88.     'Shop.configuration.validation.summary':'shop.configuration.validation.summary'|trans,
  89.     'Shop.configuration.validation.persons':'shop.configuration.validation.persons'|trans,
  90.     'shop.configuration.services-view':'shop.configuration.services-view'|trans,
  91.     'Shop.configuration.validation.services':'shop.configuration.validation.services'|trans,
  92.     'shop.configuration.no-available-dates': 'shop.configuration.no-available-dates'|trans,
  93.     'shop.configuration.date-list-view': 'shop.configuration.date-list-view'|trans,
  94.     'shop.activities.calendar-legend': 'shop.activities.calendar-legend'|trans,
  95.     'shop.pricecalculator.calculateprice':'shop.pricecalculator.calculateprice'|trans,
  96.     'shop.pricecalculator.price':'shop.pricecalculator.price'|trans,
  97.     'shop.pricecalculator.booknow':'shop.pricecalculator.booknow'|trans,
  98.     'shop.pricecalculator.basicinfos':'shop.pricecalculator.basicinfos'|trans,
  99.     'shop.pricecalculator.toptitle':'shop.pricecalculator.toptitle'|trans,
  100.     'shop.pricecalculator.choosedate':'shop.pricecalculator.choosedate'|trans,
  101.     'shop.pricecalculator.ticketprices':'shop.pricecalculator.ticketprices'|trans,
  102.     'shop.pricecalculator.datelabel':'shop.pricecalculator.datelabel'|trans,
  103.     'shop.pricecalculator.editdate':'shop.pricecalculator.editdate'|trans,
  104.     'shop.pricecalculator.editsettings':'shop.pricecalculator.editsettings'|trans,
  105.     'shop.pricecalculator.calendarto': 'shop.pricecalculator.calendarto'|trans,
  106.     'shop.pricecalculator.todetailpage': 'shop.pricecalculator.todetailpage'|trans,
  107.     'shop.pricecalculator.basiccomposition': 'shop.pricecalculator.basiccomposition'|trans,
  108.     'shop.pricecalculator.descriptionbasic': 'shop.pricecalculator.descriptionbasic'|trans,
  109.     'shop.pricecalculator.descriptioncalendar': 'shop.pricecalculator.descriptioncalendar'|trans,
  110.     'shop.pricecalculator.descriptionresult': 'shop.pricecalculator.descriptionresult'|trans,
  111.     'shop.pricecalculator.missing-info-title':'shop.pricecalculator.missing-info-title'|trans,
  112.     'shop.pricecalculator.missing-info-text':'shop.pricecalculator.missing-info-text'|trans,
  113.     'shop.configuration.dataInput-view':'shop.configuration.dataInput-view'|trans,
  114.     'shop.configuration.dataInput-calendar-view':'shop.configuration.dataInput-calendar-view'|trans,
  115.     'shop.configuration.result-view':'shop.configuration.result-view'|trans,
  116.     'shop.configuration.results-view': 'shop.configuration.results-view'|trans,
  117.     'Shop.b2b.choose-date':'Shop.b2b.choose-date'|trans,
  118.     'Shop.b2b.choose-ticket':'Shop.b2b.choose-ticket'|trans,
  119.     'Shop.b2b.choose-event':'Shop.b2b.choose-event'|trans,
  120.     'shop.b2b.add-to-cart':'shop.b2b.add-to-cart'|trans,
  121.     'shop.b2b.add-more-tickets':'shop.b2b.add-more-tickets'|trans,
  122.     'Shop.b2b.date':'Shop.b2b.date'|trans,
  123.     'general.choose-date':'general.choose-date'|trans,
  124.     'general.select-date':'general.select-date'|trans,
  125.     'Shop.ticket-config.choose-date':'Shop.ticket-config.choose-date'|trans,
  126.     'shop.configuration.ticket.configure-insurance':'shop.configuration.ticket.configure-insurance'|trans,
  127. }) %}
  128. {# 'calendar': '/faker-api/activityticket-configs/dates.json',#}
  129. {# '/faker-api/activityticket-configs/addToCart.json' #}
  130. {% do jsConfig().add({
  131.     'activityConfigUrls': {
  132.         'calendar': url('json_event_calendar_dates'),
  133.         'basePrice': url('json_event_base_price'),
  134.         'dateList': url('json_event_list_dates'),
  135.         'timeList': url('json_event_time_list_dates'),
  136.         'addToCart': url('cart_add_event'),
  137.     },
  138.     'skiTicketConfigUrls': {
  139.         'calendar': url('json_ticket_calendar_dates'),
  140.         'priceTendency': url('json_ticket_price_tendency'),
  141.         'priceTendencyPrice': url('json_ticket_price'),
  142.         'services': url('json_services'),
  143.         'pricings': url('json_ticket_pricing'),
  144.         'login': url('json_login_data'),
  145.         'persons': url('json_person_data'),
  146.         'addToCart': url('cart_add_ticket'),
  147.     },
  148.     'priceCalculatorConfigUrls': {
  149.         'calendar': url('json_priceCalculator_calendar'),
  150.         'basicInfo': url('json_priceCalculator_basic_info'),
  151.         'priceGroups': url('json_priceCalculator_price_groups'),
  152.         'tickets': url('json_priceCalculator_tickets'),
  153.     },
  154.     'seasons': {
  155.         'preseason': "shop.configuration.preseason"|trans,
  156.         'midseason': "shop.configuration.midseason"|trans,
  157.         'highseason': "shop.configuration.highseason"|trans
  158.     },
  159.     'priceTendencyLegend': {
  160.         "low": "shop.configuration.low"|trans,
  161.         "rather-low": "shop.configuration.rather-low"|trans,
  162.         "normal": "shop.configuration.normal"|trans,
  163.         "rather-high": "shop.configuration.rather-high"|trans,
  164.         "high": "shop.configuration.high"|trans,
  165.     },
  166.     'currencyRates': {
  167.         'EUR': castFloat(pimcore_website_config('exchangeRateEUR', 1)),
  168.         'CHF': 1,
  169.         'USD': castFloat(pimcore_website_config('exchangeRateUSD', 1))
  170.     },
  171.     'csrfToken': 'csrfToken',
  172.     'successUrls': {
  173.         'cart': url('cart_list'),
  174.         'checkout': url('checkout_login'),
  175.         'continueShopping': getSiteConfig().shopOverview() ? getSiteConfig().shopOverview().fullPath() : '#'
  176.     },
  177.     'verificationText': "shop.configuration.verification-config-text"|trans,
  178.     'priceTendencyLegendActivities': {
  179.         "sold-out": "shop.configuration-event.sold-out"|trans,
  180.         "low": "shop.configuration-event.normal"|trans,
  181.         "rather-high": "shop.configuration-event.rather-low"|trans,
  182.         "high": "shop.configuration-event.low"|trans
  183.     },
  184. }) %}