<?php
/**
 * Maho
 *
 * @category    design
 * @package     base_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_Reports_Block_Product_Viewed $this */
?>
<?php if ($_products = $this->getRecentlyViewedProducts()): ?>
<div class="widget widget-viewed">
    <div class="block block-list">
        <div class="block-title">
            <strong><span><?= $this->__('Recently Viewed') ?></span></strong>
        </div>
        <div class="block-content">
            <?php $suffix = $this->getNameInLayout(); ?>
            <ol id="widget-viewed-<?= $suffix ?>">
            <?php foreach ($_products as $_product): ?>
                <li class="item">
                   <p class="product-name"><a href="<?= $_product->getProductUrl() ?>"><?= $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></p>
                </li>
            <?php endforeach ?>
            </ol>
        </div>
    </div>
</div>
<?php endif ?>
