Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
stock.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
10 ?>
11 <?php if ($_products = $block->getProducts()): ?>
12 <p><?= /* @escapeNotVerified */ __('In stock alert! We wanted you to know that these products are now available:') ?></p>
13 <table>
14 <?php foreach ($_products as $_product): ?>
15  <tr>
16  <td class="col photo">
17  <a href="<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>" title="<?= $block->escapeHtml($_product->getName()) ?>" class="product photo">
18  <?= $block->getImage($_product, 'product_thumbnail_image', ['class' => 'photo image'])->toHtml() ?>
19  </a>
20  </td>
21  <td class="col item">
22  <p>
23  <strong class="product name">
24  <a href="<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>"><?= $block->escapeHtml($_product->getName()) ?></a>
25  </strong>
26  </p>
27  <?php if ($shortDescription = $block->getFilteredContent($_product->getShortDescription())): ?>
28  <p><small><?= /* @escapeNotVerified */ $shortDescription ?></small></p>
29  <?php endif; ?>
30  <?= $block->getProductPriceHtml(
31  $_product,
32  \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
33  \Magento\Framework\Pricing\Render::ZONE_EMAIL,
34  [
35  'display_label' => __('Price:')
36  ]
37  );
38  ?>
39  <p><small><a href="<?= /* @escapeNotVerified */ $block->getProductUnsubscribeUrl($_product->getId()) ?>"><?= /* @escapeNotVerified */ __('Click here to stop alerts for this product.') ?></a></small></p>
40  </td>
41  </tr>
42 <?php endforeach; ?>
43 </table>
44 <p><a href="<?= /* @escapeNotVerified */ $block->getUnsubscribeUrl() ?>"><?= /* @escapeNotVerified */ __('Unsubscribe from all stock alerts') ?></a></p>
45 <?php endif; ?>
__()
Definition: __.php:13
$_product
Definition: summary.phtml:12
endif
Definition: stock.phtml:44
$block
Definition: block.php:8
endforeach
Definition: stock.phtml:39