<?php
/**
 * Copyright © 2016 maijindou.com All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/** @var $block \Magento\ProductAlert\Block\Email\Price */
?>
<?php if ($_products = $block->getProducts()): ?>
<p><?= /* @escapeNotVerified */  __('Price change alert! We wanted you to know that prices have changed for these products:') ?></p>
<table>
<?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
<?php foreach ($_products as $_product): ?>
    <tr>
        <td class="col photo">
            <a href="<?= /* @escapeNotVerified */  $_product->getProductUrl() ?>" title="<?= $block->escapeHtml($_product->getName()) ?>" class="product photo">
                <?php echo $block->getImage($_product, 'product_thumbnail_image', ['class' => 'photo image'])->toHtml(); ?>
            </a>
        </td>
        <td class="col item">
            <p>
                <strong class="product name">
                    <a href="<?= /* @escapeNotVerified */  $_product->getProductUrl() ?>"><?= $block->escapeHtml($_product->getName()) ?></a>
                </strong>
            </p>
            <?php if ($shortDescription = $block->getFilteredContent($_product->getShortDescription())): ?>
                <p><small><?= /* @escapeNotVerified */  $shortDescription ?></small></p>
            <?php endif; ?>
            <?= $block->getProductPriceHtml(
                    $_product,
                    \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE,
                    \Magento\Framework\Pricing\Render::ZONE_EMAIL,
                    [
                        'display_label' => __('Price:')
                    ]
                );
                ?>
            <p><small><a href="<?= /* @escapeNotVerified */  $block->getProductUnsubscribeUrl($_product->getId()) ?>"><?= /* @escapeNotVerified */  __('Click here to stop alerts for this product.') ?></a></small></p>
        </td>
    </tr>
<?php endforeach; ?>
</table>
<p><a href="<?= /* @escapeNotVerified */  $block->getUnsubscribeUrl() ?>"><?= /* @escapeNotVerified */  __('Unsubscribe from all price alerts') ?></a></p>
<?php endif; ?>
