<?php

/**
 * @package     VP Neoteric
 *
 * @author      Abhishek Das <info@virtueplanet.com>
 * @link        https://www.virtueplanet.com
 * @copyright   Copyright (C) 2023-2025 Virtueplanet Services LLP. All Rights Reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
**/

defined('_JEXEC') or die;

$items       = [];
$items[]     = $products;
$ratingModel = VmModel::getModel('ratings');
$showRating  = $ratingModel->showRating();

vmJsApi::jPrice();
?>
<div class="vm-product-module">
    <?php if (!empty($headerText)) : ?>
        <div class="vm-product-module__pretext">
            <?php echo $headerText; ?>
        </div>
    <?php endif; ?>

    <?php echo shopFunctionsF::renderVmSubLayout('products', ['products' => $items, 'currency' => $currency, 'products_per_row' => $products_per_row, 'showRating' => $showRating, 'showAddToCart' => $show_addtocart, 'showPrice' => $show_price]); ?>

    <?php if (!empty($footerText)) : ?>
        <div class="vm-product-module__posttext">
            <?php echo $footerText; ?>
        </div>
    <?php endif; ?>
</div>

<?php echo vmJsApi::writeJS(); ?>
