0

I am trying to show products number correctly in product list, but if click Load More button, added all products

= Before click Load More

enter image description here

enter image description here

= After click Load More

enter image description here


Added Extension - Infinite Scroll

enter image description here

if it was working in magento2.3.4, should I update extension version? /home/caterin1/test.cateringspares.com.au/app/code/Olegnax/InfiniteScroll/view/frontend/templates/loader.phtml

<?php
/**
 * @author      Olegnax
 * @package     Olegnax_InfiniteScroll
 * @copyright   Copyright (c) 2019 Olegnax (http://olegnax.com/). All rights reserved.
 * See COPYING.txt for license details.
 */

use Olegnax\InfiniteScroll\Helper\Helper;
use Olegnax\InfiniteScroll\Model\Config\Source\LoaderType;
use Olegnax\InfiniteScroll\Model\Config\Source\Type;

/** @var Helper $_helper */
$config = $this->helper(Helper::class)->getModuleConfig('general');
if (('' !== $config['loader_type'] && Type::TYPE_DISABLED !== $config['type']) || Type::TYPE_BUTTON == $config['type']): ?>
    <script data-role="ox-infinity-scroll" type="text/x-magento-template">
        <div class="ox-product-scroll ox-product-scroll__loader--<?= $config['loader_type']; ?> ox-product-scroll__type--<?= $config['type']; ?>">
            <?php if ($config['progress_counter']): ?>
                <div class="ox-product-scroll__amount">
                    <div class="amount-wrap">
                        <?= $config['progress_label1']; ?> <span class="toolbar-number-first"></span> - <span class="toolbar-number-last"></span> <?= $config['progress_label2']; ?> <span class="toolbar-number-total"></span> <?= $config['progress_label3']; ?>
                    </div>
                    <div class="amount-count-line"><span style="width: 0%;"></span></div>
                </div>
            <?php endif; ?>
            <?php if ('' !== $config['loader_type'] && Type::TYPE_DISABLED !== $config['type']): ?>
                <div class="ox-product-scroll__loader">
                    <?php if (LoaderType::TYPE_IMAGE == $config['loader_type']): ?>
                        <img src="<?= $this->getViewFileUrl($config['loader']) ?>"
                             class="ox-product-scroll__loader-image"/>
                    <?php endif; ?>
                </div>
            <?php endif; ?>
            <?php if (Type::TYPE_BUTTON == $config['type']): ?>
                <div class="button ox-product-scroll__button">
                    <span class="label"><?= $config['button_label']; ?></span>
                </div>
            <?php endif; ?>
        </div>
    </script>
<?php endif; ?>

1 Answer 1

0

The magento doesn't provide the load more function by default. And the attached codes don't relate to the load more function. The exception.log is related to the admin. I think you installed the one extension for the load more function.

  1. Please check the extension configuration.
  2. Check the extension codes.

And in default, the product numbers displayed by magento root directory/app/design/frontend/theme/Magento_Catalog/templates/product/list/toolbar/amount.phtml

6
  • Thanks for your help, so I find infinite scroll extension, is right? how should I change it?
    – Bohdan V.
    Commented Jan 11, 2023 at 23:11
  • Please attach the full extension name, there are too many infinite scroll extension. Or you can check the infinite scroll extension documentation.
    – Aaron Wang
    Commented Jan 12, 2023 at 13:46
  • if it was upgrading from magento2.3.4 to 2.4.3-p3, should I update extension version?
    – Bohdan V.
    Commented Jan 12, 2023 at 15:32
  • Yes, of course And there are many things to do
    – Aaron Wang
    Commented Jan 12, 2023 at 15:54
  • what's mean many thing? can you explain more detail?
    – Bohdan V.
    Commented Jan 12, 2023 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.