<?php
/**
 * Maho
 *
 * @category    design
 * @package     rwd_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2020-2022 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)
 */
?>
<?php if ($_products = $this->getRecentlyComparedProducts()): ?>
<div class="widget widget-compared">
    <div class="block block-list">
        <div class="block-title">
            <strong><span><?= $this->__('Recently Compared') ?></span></strong>
        </div>
        <div class="block-content">
            <?php $suffix = $this->getNameInLayout(); ?>
            <ol class="mini-products-images-list" id="widget-compared-<?= $suffix ?>">
            <?php $i=0; foreach ($_products as $_product): ?>
                <li class="item">
                    <?php $_imgSize = 310; // Images will be displayed at roughly this size when viewed at less than the medium breakpoint ?>
                    <a class="product-image" href="<?= $_product->getProductUrl() ?>" title="<?= $this->stripTags($_product->getName(), null, true) ?>"><img src="<?= $this->helper('catalog/image')->init($_product, 'thumbnail')->resize($_imgSize) ?>" alt="<?= $this->stripTags($_product->getName(), null, true) ?>" /></a>
                </li>
            <?php endforeach ?>
            </ol>
        </div>
    </div>
</div>
<?php endif ?>
