customer-data.phtml 781 B

1234567891011121314151617181920
  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. ?>
  8. <script type="text/x-magento-init">
  9. <?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode([
  10. '*' => ['Magento_Customer/js/customer-data' => [
  11. 'sectionLoadUrl' => $block->getCustomerDataUrl('customer/section/load'),
  12. 'expirableSectionLifetime' => $block->getExpirableSectionLifetime(),
  13. 'expirableSectionNames' => $block->getExpirableSectionNames(),
  14. 'cookieLifeTime' => $block->getCookieLifeTime(),
  15. 'updateSessionUrl' => $block->getCustomerDataUrl('customer/account/updateSession'),
  16. ]],
  17. ]);
  18. ?>
  19. </script>