Hi, today I finished another extension to Magento 2.1, the “Out Of Stock Last”.

This extension enables the feature to display the out of stock products in the end of every product list.

This is a very useful feature because when the customer are looking for a product he needs to find first the products that are available in the store and not the products that are out of stock.

You can download the extension in the BitButcket repository: https://goo.gl/glP9s6

Check the Wiki to see the installation and configuration instructions: https://goo.gl/XqvZ76

To install this extension via Magento Marketplace access this link: https://goo.gl/kBvCyu

Until the next post! See ya!


Olá pessoal, hoje finalizei uma outra extensão para Magento 2.1, a “Out Of Stock Last”

Esta extensão habilita a funcionalidade the exibir os produtos sem estoque no fim da listagem dos produtos em páginas como de categoria e de busca de produtos.

Você pode realizar o download da extensão pelo repositório do BitButcket: https://goo.gl/glP9s6

Veja a Wiki visualizar as instruções de instalação e configuração da extensão: https://goo.gl/XqvZ76

Para instalar esta extensão pelo Marketplace oficial do Magento acesse este link: https://goo.gl/kBvCyu

Até o próximo post pessoal, um abraço!

Magento 2 Extension – Out Of Stock Last

Igor Ludgero

PHP & Magento Developer from Brazil.

Post navigation

10 thoughts on “Magento 2 Extension – Out Of Stock Last

  1. How do you install this extension as most I have installed come with a folder structure which this does not.

    Should I create a folder structure before uploading for mage2 for example


    Thanks in advance

      1. List of enabled modules:

        I uploaded to

        I ran all the following commands
        php bin/magento module:enable Igorludgero_Outofstocklast
        php bin/magento setup:upgrade
        php bin/magento setup:static-content:deploy
        php bin/magento indexer:reindex
        php bin/magento cache:clean

        I enable the module in the Configuration > Catalog
        Set it to Yes

        As you can see out of stock items still persist all throughout the Category.

        I am running 2.1.7 so do you think there is something incorrect with the procedures I followed? Thanks in Advance

          1. Hi sorry for delay yes I have a theme that alters the layout Magento_Catalog & Magento_CatalogSearch. Any particular file in particular I shuld be looking at?

  2. I have installed the module on a dev instance with the following commands
    rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
    composer require igorludgero/outofstocklast
    php -f bin/magento setup:upgrade
    php -f bin/magento module:enable Igorludgero_Outofstocklast

    The module appears in the backend but in the frontend i get always this error. If i disable the module everything works fine.. Any idea?

    2 exception(s):
    Exception #0 (Magento\Framework\Exception\LocalizedException): Ungültiger Block-Typ: Magento\Catalog\Block\Product\ListProduct
    Exception #1 (ReflectionException): Class Igorludgero\Outofstocklast\Block\Product\ListProduct does not exist

    Exception #0 (Magento\Framework\Exception\LocalizedException): Ungültiger Block-Typ: Magento\Catalog\Block\Product\ListProduct
    #0 /home/123941.cloudwaysapps.com/mufwgmbkyt/public_html/vendor/magento/framework/View/Layout/Generator/Block.php(249): Magento\Framework\View\Layout\Generator\Block->getBlockInstance(‘Magento\\Catalog…’, Array)
    #1 /home/123941.cloudwaysapps.com/mufwgmbkyt/public_html/vendor/magento/framework/View/Layout/Generator/Block.php(227): Magento\Framework\View\Layout\Generator\Block->createBlock(‘Magento\\Catalog…’, ‘category.produc…’, Array)
    #2 /home/123941.cloudwaysapps.com/mufwgmbkyt/public_html/vendor/magento/framework/View/Layout/Generator/Block.php(135): Magento\Framework\View\Layout\Generator\Block->generateBlock(Object(Magento\Framework\View\Layout\ScheduledStructure), Object(Magento\Framework\View\Layout\Data\Structure), ‘category.produc…’)
    #3 /home/123941.cloudwaysapps.com/mufwgmbkyt/public_html/vendor/magento/framework/View/Layout/GeneratorPool.php(80): Magento\Framework\View\Layout\Generator\Block->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
    #4 /home/123941.cloudwaysapps.com/mufwgmbkyt/public_html/vendor/magento/framework/View/Layout.php(344): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))

  3. Será possível diferenciar entre produtos que são na pre-venda (cliente pode pedir, a loja vai procurar e entregar o produto, mas não tem estoque desse produto) e produtos esgotados que não são mais disponíveis (e que só ficam para melhorar SEO etc.)?

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest