You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
1.0 KiB

  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /** @var \Magento\Customer\Block\CustomerData $block */
  7. // phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
  8. ?>
  9. <script type="text/x-magento-init">
  10. {
  11. "*": {
  12. "Magento_Customer/js/customer-data": {
  13. "sectionLoadUrl": "<?= $block->escapeJs($block->getCustomerDataUrl('customer/section/load')) ?>",
  14. "expirableSectionLifetime": <?= (int)$block->getExpirableSectionLifetime() ?>,
  15. "expirableSectionNames": <?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)
  16. ->jsonEncode($block->getExpirableSectionNames()) ?>,
  17. "cookieLifeTime": "<?= $block->escapeJs($block->getCookieLifeTime()) ?>",
  18. "updateSessionUrl": "<?= $block->escapeJs(
  19. $block->getCustomerDataUrl('customer/account/updateSession')
  20. ) ?>"
  21. }
  22. }
  23. }
  24. </script>