opening_hours.phtml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. ?>
  6. <?php
  7. /** @var \Magento\Framework\View\Element\Template $block */
  8. $openingHours = $block->getData('opening_hours');
  9. ?>
  10. <?php if (is_array($openingHours['general']) && !empty($openingHours['general'])) : ?>
  11. <h4><?= $block->escapeHtml(__('Opening Hours')) ?></h4>
  12. <?php foreach ($openingHours['general'] as $general) : ?>
  13. <p>
  14. <?= $block->escapeHtml($general['days']); ?>
  15. <?= $block->escapeHtml($general['times']); ?>
  16. </p>
  17. <?php endforeach; ?>
  18. <?php endif; ?>
  19. <?php if (is_array($openingHours['specific']) && !empty($openingHours['specific'])) : ?>
  20. <?php foreach ($openingHours['specific']['openings'] as $specific) : ?>
  21. <p>
  22. <?= $block->escapeHtml(__(
  23. 'Open %1 %2 to %3',
  24. $specific['description'],
  25. $specific['from'],
  26. $specific['to']
  27. )); ?>
  28. </p>
  29. <?php endforeach; ?>
  30. <?php foreach ($openingHours['specific']['closures'] as $specific) : ?>
  31. <p>
  32. <?= $block->escapeHtml(__(
  33. 'Closed %1 %2 to %3',
  34. $specific['description'],
  35. $specific['from'],
  36. $specific['to']
  37. )); ?>
  38. </p>
  39. <?php endforeach; ?>
  40. <?php endif; ?>