<?php
/**
 * Maho
 *
 * @category    design
 * @package     rwd_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2021-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->getProductCollection()) && $_products->getSize()): ?>
<div class="widget widget-new-products">
    <div class="block block-list">
        <div class="block-title">
            <strong><span><?= $this->__('New Products') ?></span></strong>
        </div>
        <div class="block-content">
            <?= $this->getPagerHtml() ?>
            <?php $suffix = $this->getNameInLayout(); ?>
            <ol id="widget-new-products-<?= $suffix ?>">
            <?php foreach ($_products->getItems() as $_product): ?>
                <li class="item">
                    <p class="product-name"><a href="<?= $_product->getProductUrl() ?>" title="<?= $this->stripTags($_product->getName(), null, true) ?>)"><?= $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></p>
                </li>
            <?php endforeach ?>
            </ol>
        </div>
    </div>
</div>
<?php endif ?>
