Magento 2.4.x module Sort Out Of Stock Product At last the product list

Overview

Magento 2.4.x module Sort Out Of Stock Product At last the product list

composer require ghoster/module-outofstockatlast

License: GPL v3 Donate Codacy Badge Build Status Version 1.0.0


Main Functionalities

  • Sort Out Of Stock Product At last the product list
  • Compatibility with smile/elasticsuite~2.10.0
  • Firstly Display Out of Stock Products Stores > Configuration > Catalog > Inventory > Stock must be set Yes
  • Of course, we are talking about Elastic Search. We don't support old search engine

Installation

* = in production please use the --keep-generated option

Type 1: Zip file

  • Unzip the zip file in app/code/GhoSter
  • Enable the module by running php bin/magento module:enable GhoSter_OutOfStockAtLast
  • Apply database updates by running php bin/magento setup:upgrade*
  • Flush the cache by running php bin/magento cache:flush

Type 2: Composer

  • Make the module available in a composer repository for example:
    • private repository repo.magento.com
    • public repository packagist.org
    • public GitHub repository as vcs
  • Add the composer repository to the configuration by running composer config repositories.repo.magento.com composer https://repo.magento.com/
  • Install the module composer by running composer require ghoster/module-outofstockatlast
  • enable the module by running php bin/magento module:enable GhoSter_OutOfStockAtLast
  • apply database updates by running php bin/magento setup:upgrade*
  • Flush the cache by running php bin/magento cache:flush

Configuration

  • Reindexing after you enable the module
Comments
  • Causes Issue with Elasticsearch

    Causes Issue with Elasticsearch

    2021-10-20 12:47:50] main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [out_of_stock_at_last] in order to sort on","index_uuid":"mZx8iP_-TwqV3YZhSb0mRQ","index":"magento2_product_1_v182"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v182","node":"QojGcWy_SN-pJQgKPP89cA","reason":{"type":"query_shard_exception","reason":"No mapping found for [out_of_stock_at_last] in order to sort on","index_uuid":"mZx8iP_-TwqV3YZhSb0mRQ","index":"magento2_product_1_v182"}}]},"status":400} {"exception":"[object] (Elasticsearch\Common\Exceptions\BadRequest400Exception(code: 400): {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [out_of_stock_at_last] in order to sort on","index_uuid":"mZx8iP_-TwqV3YZhSb0mRQ","index":"magento2_product_1_v182"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v182","node":"QojGcWy_SN-pJQgKPP89cA","reason":{"type":"query_shard_exception","reason":"No mapping found for [out_of_stock_at_last] in order to sort on","index_uuid":"mZx8iP_-TwqV3YZhSb0mRQ","index":"magento2_product_1_v182"}}]},"status":400} at /home/domain/public_html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:675)"} []

    bug help wanted 
    opened by terrybakshi 6
  •  When you order by price it doesn't work

    When you order by price it doesn't work

    Preconditions (*)

    Magento version 2.4 PHP version 7.4

    Steps to reproduce (*)

    Go to category and order by price

    Expected result (*)

    It is expected to order by price, leaving the products out of stock at the end

    Actual result (*)

    Sort by price without considering out of stock products

    bug magento bug 
    opened by NachoVidalGolosinas 6
  • Sort by Position of products not working on category page

    Sort by Position of products not working on category page

    after installing the extension , sorting products by position are not working anymore on category pages. I got this once working in magento 2.2.3 in ListProduct.php using this code: $collection->addExpressionAttributeToSelect('in_stock', 'IFNULL(stock_status_index.stock_status,0)', array()); $collection->getSelect()->reset('order'); $collection->getSelect()->order('in_stock DESC');

    need update 
    opened by PiroozMB 3
  • Compatibility with smile/elasticsuite

    Compatibility with smile/elasticsuite

    Preconditions (*)

    1. Request from issue https://github.com/tuyennn/magento2-outofstockatlast/issues/1

    Steps to reproduce (*)

    1. None

    Expected result (*)

    1. Compatibility with smile/elasticsuite
    enhancement 
    opened by tuyennn 3
  • Sort Products based on backorders

    Sort Products based on backorders

    I want to display all in-Stock products at the first and backorders product in the last of the page. for example- suppose we have total 5 products. 4 products are In-Stock, so these products will be display first, 5th products will be feature at last as the 5th products is out of stock and we have enabled back-order so it must display at last,

    Please help How to accomplice it? Thanks in advance. any help regrading this would be appreciated.,

    Note- I am not showing out of stock products on the webshop. I need to display only In Stock prodycts and the backorders products on website. and the backorders products should display in last on categories pages.

    enhancement question wontfix 
    opened by noshadinfoicon 1
  • Magento 2.4.4 not working

    Magento 2.4.4 not working

    Preconditions (*)

    1. Magento 2.4.4 Installed
    2. Default sorting set as Bestsellers
    3. Module installed and catalog reindexed

    Steps to reproduce (*)

    1. Open any category and you will see out of stock product in the middle of the category page

    Expected result (*)

    Module working as aspected

    Actual result (*)

    1. Not working
    opened by webcreative24 1
  • Manual sorting smile/elasticsuite compatibility

    Manual sorting smile/elasticsuite compatibility

    Preconditions (*)

    1. Magento 2.4.x
    2. With smile/elasticsuite

    Steps to reproduce (*)

    1. Edit category
    2. Manually sorting and add out of stock products

    Expected result (*)

    1. Manually out of stock products sorting should moved to the last

    Actual result (*)

    1. Manually out of stock products sorting kept position
    2. Ref https://github.com/tuyennn/magento2-outofstockatlast/issues/3
    enhancement compatibility 
    opened by tuyennn 1
  • Column not found: 1054 Unknown column 'stock_status_idx.stock_status' in 'where clause', query was

    Column not found: 1054 Unknown column 'stock_status_idx.stock_status' in 'where clause', query was

    Precondtion : Magento 2.4 Module - Smile ELastic and Layered Navigation (https://landofcoder.com/magento-2-layered-navigation.html )

    Issue - AFter installing Layered Navigation i get below error -

    Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'stock_status_idx.stock_status' in 'where clause', query was: SELECT 1 AS status, e.entity_id, e.attribute_set_id, e.type_id, e.created_at, e.updated_at, e.sku, cat_index.position AS cat_index_position FROM catalog_product_flat_1 AS e INNER JOIN catalog_category_product_index_store1 AS cat_index ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.category_id=1039 WHERE (stock_status_idx.stock_status = '1') Exception #1 (PDOException): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'stock_status_idx.stock_status' in 'where clause'

    Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'stock_status_idx.stock_status' in 'where clause', query was: SELECT 1 AS status, e.entity_id, e.attribute_set_id, e.type_id, e.created_at, e.updated_at, e.sku, cat_index.position AS cat_index_position FROM catalog_product_flat_1 AS e INNER JOIN catalog_category_product_index_store1 AS cat_index ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.category_id=1039 WHERE (stock_status_idx.stock_status = '1')

    wontfix compatibility 
    opened by ia-gaurav 1
  • Feature/issue15 query shard exception

    Feature/issue15 query shard exception

    Possible fix for https://github.com/tuyennn/magento2-outofstockatlast/issues/15

    query_shard_exception. No mapping found for [out_of_stock_at_last] in order to sort on

    opened by tuyennn 0
  • Compatibility with Amasty Shopby

    Compatibility with Amasty Shopby

    Preconditions (*)

    1. Magento 2.4.x
    2. Install Amasty Shopby

    Steps to reproduce (*)

    2021-10-20 12:47:50] main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [out_of_stock_at_last] in order to sort on","index_uuid":"mZx8iP_-TwqV3YZhSb0mRQ","index":"magento2_product_1_v182"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v182","node":"QojGcWy_SN-pJQgKPP89cA","reason":{"type":"query_shard_exception","reason":"No mapping found for [out_of_stock_at_last] in order to sort on","index_uuid":"mZx8iP_-TwqV3YZhSb0mRQ","index":"magento2_product_1_v182"}}]},"status":400} {"exception":"[object] (Elasticsearch\Common\Exceptions\BadRequest400Exception(code: 400): {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [out_of_stock_at_last] in order to sort on","index_uuid":"mZx8iP_-TwqV3YZhSb0mRQ","index":"magento2_product_1_v182"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v182","node":"QojGcWy_SN-pJQgKPP89cA","reason":{"type":"query_shard_exception","reason":"No mapping found for [out_of_stock_at_last] in order to sort on","index_uuid":"mZx8iP_-TwqV3YZhSb0mRQ","index":"magento2_product_1_v182"}}]},"status":400} at /home/domain/public_html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:675)"} []
    

    Expected result (*)

    1. No exception

    Actual result (*)

    1. [Screenshots, logs or description]

    This seem was mentioned on https://github.com/tuyennn/magento2-outofstockatlast/issues/15

    enhancement compatibility 
    opened by tuyennn 0
  • [Issue#10]: Fix order by price it doesn't work due missing flag to co…

    [Issue#10]: Fix order by price it doesn't work due missing flag to co…

    …llection

    Possible fix for https://github.com/tuyennn/magento2-outofstockatlast/issues/10

    Steps to reproduce

    Go to category and order by price

    Expected result

    It is expected to order by price, leaving the products out of stock at the end

    Actual result

    Sort by price without considering out of stock products

    opened by tuyennn 0
  • [FEATURE] - Other Search Engines

    [FEATURE] - Other Search Engines

    Hi,

    This is fantastic work. I'm just looking at integrating it with a few other areas such as Amasty ElasticSearch and Mirasvit Search Ultimate.

    Neither paid plugin gives the option to move out of stock last.

    Any experience with either? Just looking to update the di.xml files for both to allow for your out_of_stock flag

    enhancement 
    opened by kestraly 0
  • [FEATURE] Hide out of stock items on specific categories and store view

    [FEATURE] Hide out of stock items on specific categories and store view

    Preconditions (*)

    1. Module Installed
    2. Magento 2.4.x

    Steps to reproduce (*)

    Expected result (*)

    1. While Display Out of Stock Products Stores > Configuration > Catalog > Inventory > Stock set Yes
    2. A category attribute option allow forcing hide out of stock items on specific category but another categories still remain display the OOS products

    Actual result (*)

    enhancement 
    opened by tuyennn 0
  • [FEATURE] Option to be able to specify categories to which this function will be enabled

    [FEATURE] Option to be able to specify categories to which this function will be enabled

    Preconditions (*)

    1. Module installed
    2. Magento 2.4.x

    Steps to reproduce (*)

    1. An category attribute to switch to specify the sorting is allowed to work

    Expected result (*)

    1. An category attribute to switch to specify the sorting is allowed to work
    2. When this ignore flag was set Yes on category level, the Out Of Stock At Last took no effect

    Actual result (*)

    enhancement 
    opened by tuyennn 0
  • [FEATURE] Add configuration Enable/Disable

    [FEATURE] Add configuration Enable/Disable

    Preconditions (*)

    1. Current module has no configuration to enable/disable

    Steps to reproduce (*)

    Expected result (*)

    1. Add configuration Enable/Disable
    2. Could based on store view

    Actual result (*)

    1. Current module has no configuration to enable/disable
    enhancement 
    opened by tuyennn 0
  • Compatibility with Hyva

    Compatibility with Hyva

    Preconditions (*)

    1. Magento
    2. Hyva theme

    Steps to reproduce (*)

    Expected result (*)

    1. Compatibility with Hyva

    Actual result (*)

    1. [Screenshots, logs or description]
    enhancement compatibility dev in progress 
    opened by tuyennn 0
Releases(v1.0.5)
Owner
Tuyen Nguyen
Magento Developer
Tuyen Nguyen
Adds a compact "easy-sort" mode to Repeater and Repeater Matrix, making those fields easier to sort when there are a large number of items.

Repeater Easy Sort Adds a compact "easy-sort" mode to Repeater and Repeater Matrix, making those fields easier to sort when there are a large number o

Robin Sallis 3 Oct 10, 2021
Laravel eCommerce Pre Order Extension allows the customers and guest users to pre-order the upcoming product and out of stock products.

Introduction Bagisto Pre-order add-on allows the customer to pre-order products which are not yet available at the online store. With the help of Bagi

Bagisto 3 May 31, 2022
Magento 2 Module that adds Donation Product Type. Enables the customer to add a donation (product) of a preferred amount to the cart.

Magento 2 Module Experius DonationProduct (RC1.0) Demo website: https://donationproduct.experius.nl Magento Marketplace: https://marketplace.magento.c

Experius 23 Apr 1, 2022
Log and display the product stock movements

Aropixel Sylius Stock Movement Plugin Log and display the product stock movements. When the stock of a product is updated, the stock movement will be

Aropixel 1 Oct 28, 2021
Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Strategery 123 Nov 20, 2021
Enhancement to Magento to allow simple product prices to be used instead of the default special-case configurable product prices

Simple Configurable Products Extension For Magento This documentation applies to SCP versions 0.7 onwards. The documentation for SCP v0.6 and earlier

Simon King 288 Nov 7, 2022
The Laravel eCommerce DHL Shipping module module calculates the shipping rates based on DHL API for product shipping.

Introduction DHL Shipping Add-on provides DHL Shipping methods for shipping the product. It packs in lots of demanding features that allows your busin

Bagisto 1 May 31, 2022
Simple WordPress plugin demonstrating how one can sort posts within a taxonomy.

Simple WordPress plugin to demonstrate how to sort posts in a taxonomy. How to test Download the project and install it as a plugin in your WordPress

David Aguilera 3 Aug 16, 2022
A simple Laravel Package to sort Countries, States and Cities

Laravel Location ▲ Introduction ?? This Package offers a simple way to get Countries, Cities and States that you may need for your Application, most e

Michael Okoh 197 Jan 1, 2023
The query sorting bundle allows you to sort data from QueryBuilder and the Database

The query sorting bundle allows you to sort data from QueryBuilder and the Database. you can sort multiple columns at the same time and also you can sort relation fields with two-level deep and without any join in your query builder.

Bugloos 12 Oct 6, 2022
DiscordLookup | Get more out of Discord with Discord Lookup! Snowflake Decoder, Guild List with Stats, Invite Info and more...

DiscordLookup Get more out of Discord with Discord Lookup! Snowflake Decoder, Guild List with Stats, Invite Info and more... Website Getting Help Tool

Felix 69 Dec 23, 2022
A Magento 2 module that allows for creating discrete PDP (Product Detail Pages) page layouts for customers landing on the site from a PPC (Pay Per Click) link/ad by allowing routing to the same pages using a `/ppc/` prefix in the URL path.

A Magento 2 module that allows for creating discrete PDP (Product Detail Pages) page layouts for customers landing on the site from a PPC (Pay Per Click) link/ad by allowing routing to the same pages using a `/ppc/` prefix in the URL path.

null 16 Nov 11, 2022
Tugas Kelompok Aplikasi Web Stock Sederhana : Stok Restoran

Tentang Web Ini Web app ini dibuat untuk persyaratan pengumpulan tugas github matakuliah MKPL. web app ini memiliki fitur CRUD stok berbagai jenis mak

wijoyo wisnu mukti 3 May 4, 2021
The stock market inflation adjusted for the US-money supply

Inflation Chart Inflation Chart is a project to find the intrinsic value of stock markets, stock prices, goods and services by adjusting them to the a

levelsio 96 Apr 14, 2022
The objective of this Project is to generate Stock Management

Stock-Management The objective of this Project is to generate Stock Management Items / purchases, Sales Stock Client Provider Sales Management Purchas

Reda Ennakouri 7 Sep 18, 2022
The API for my blog series about creating a simple stock portfolio

Stockportfolio API This repository is the API part of my blog series 'How to create a simple application using Symfony and React Native' which can be

Wouter Carabain 4 Sep 5, 2022
A simple mini pos that handles managing product data's and product categories

What is CodeIgniter CodeIgniter is an Application Development Framework - a toolkit - for people who build web sites using PHP. Its goal is to enable

Mahendra Dwi Purwanto 0 Dec 26, 2021
An Infection + Last Man Standing Event plugin written for OwnagePE

KitPvPEvent An Infection + Last Man Standing Event plugin written for OwnagePE This plugin was a speedcode. I kinda woke up really late on the day I w

OwnagePE Network 2 May 26, 2022
Repository for the last open source version of Booked Scheduler.

Welcome to Booked Scheduler This is a community effort to keep the OpenSource GPLv3 BookedScheduler alive, see History Prerequisites PHP 7.0 or greate

null 259 Jan 5, 2023
LDAP-OSNAME-CHANGE-ALLOWER - This is my first php, hopefully last.

LDAP-OSNAME-CHANGE-ALLOWER This PHP script allows SELF user to read and write the 'Operating System' property on the target computer/s. How was it dev

Özgün Kültekin 5 Apr 9, 2022