<?php
/**
 * Maho
 *
 * @category    design
 * @package     rwd_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2021-2024 The OpenMage Contributors (https://openmage.org)
 * @copyright   Copyright (c) 2024 Maho (https://mahocommerce.com)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/**
 * @var Mage_ProductAlert_Block_Email_Stock $this
 */
?>
<?php if ($products = $this->getProducts()): ?>
<p><?= $this->__('You are receiving this notification because you subscribed to receive alerts when the following products are back in stock:') ?></p>
<table>
<?php foreach ($products as $product): ?>
    <tr>
        <td><a href="<?= $product->getProductUrl() ?>" title="<?= $this->escapeHtml($product->getName()) ?>"><img src="<?= $this->helper('catalog/image')->init($product, 'thumbnail')->resize(75, 75) ?>" border="0" align="left" height="75" width="75" alt="<?= $this->escapeHtml($product->getName()) ?>" /></a></td>
        <td>
            <p><a href="<?= $product->getProductUrl() ?>"><strong><?= $this->escapeHtml($product->getName()) ?></strong></a></p>
            <?php $shortDescription = $this->_getFilteredProductShortDescription($product) ?>
            <?php if ($shortDescription): ?>
                <p><small><?= $shortDescription ?></small></p>
            <?php endif ?>
            <p><?php if ($product->getPrice() != $product->getFinalPrice()): ?>
                <?= $this->__('Regular Price:') ?> <strong style="text-decoration:line-through;"><?= Mage::helper('core')->currency($product->getPrice()) ?></strong><br />
                <strong><?= $this->__('Special price:') ?> <span style="color:#FF0000;"><?= Mage::helper('core')->currency($product->getFinalPrice()) ?></span></strong>
            <?php else: ?>
                <strong><?= $this->__('Price:') ?></strong> <?= Mage::helper('core')->currency($product->getPrice()) ?>
            <?php endif ?></p>
            <p><small><a href="<?= $this->getProductUnsubscribeUrl($product->getId()) ?>"><?= $this->__('Click here not to receive alerts for this product') ?></a></small></p>
        </td>
    </tr>
<?php endforeach ?>
</table>
<p><a href="<?= $this->getUnsubscribeUrl() ?>"><?= $this->__('Unsubscribe from all stock alerts') ?></a></p>
<?php endif ?>
