Your shopping cart is empty

Module Sort products in-stock first
for PrestaShop 8, 1.7, 1.6, 1.5

Moves products that are unavailable for sale to the end of the lists on different pages or blocks, respecting the configured sorting.
19,99 €

About author

Maksim T.
Maksim T.
Freelancer.
Developer.
Works since 2010.
Products: 47.

Questions?

The customer service for this component does not include free personal consultations. Only business offers and important information are accepted.
Sort products in-stock first
The best seller!
 

Description

Short Description

Moves products that are unavailable for sale to the end of the lists on different pages or blocks, respecting the configured sorting.

Benefits for the e-merchant

Automation of manual labor.

No need to disable a product when it is not available for sale (for example, out of stock), and then to enable when it become available for an order. With this module, manual labor is completely excluded, as moving products to the end of any list is done automatically!

Website promotion and SEO.

The module will allow you to leave products visible for search bots and users until products temporarily unavailable or will no longer available for sale. This is a good practice, since product pages stay available in a search index of search engines and therefore saves free user traffic from a search. In addition, you could get potential user activity, for example, commenting on products by users on your site or linking to these pages from another site, which may attract new potential customers.

Benefits for the customer

A customer sees always available products for sale in the first place and thereby save his time and nerves to find needed product. The module is especially useful when a store has much products, many of which are often unavailable for sale due to out of stock. Thus, the module helps build customer loyalty.

Features

The main feature is moving products to the end of the list that are unavailable for sale, respecting the configured sorting. Sorting may be configured by a customer when he viewing your store website or by PrestaShop itself through the default settings.

The module implements the following logic for moving products in a list:

  1. The first products in the list are the products that have a stock quantity.
  2. They are followed by products that have no stock quantity but have the "Allow orders when out of stock" option checked.
  3. The last products are those that cannot be purchased for any of the following reasons: a) "Available for order" is unchecked; b) there is no stock quantity and the "Allow orders when out of stock" option is unchecked.

Examples where the feature of moving products is functions:

  1. categories
  2. search (including a list of instant results by Ajax)
  3. manufacturers
  4. suppliers
  5. new products
  6. bestsellers
  7. prices drop
  8. and other pages and blocks

With any sorting option, a customer will always see products available for an order, and at the very end of the list, a customer will see products which are unavailable for sale (out of stock, sale prohibited).

Particular qualities:

  1. The module do not change data in a database of a shop. The module just moving products to the end of a list on run-time.
  2. The module also works with product packs (products that are combined into a set - a pack).
  3. The module has an additional special cache for 4 hours for storing ready-made data of stock quantities, which allows the module to work very quickly.
  4. The module has a special option to optimize performance for the case when the store website does not keep track of stock at all, but only uses the "Available for order" option in the product settings to indicate that customers can buy the product.
  5. The "Sort by stock quantity" option on the product listing pages is no longer needed (you can remove it yourself).

Integration with other modules.

  • The module works correctly together with various modules that use PrestaShop core to get a list of products, for example: «Top-sellers block», «New products block», «Featured products on the homepage» and many others.
  • But the out-of-the-box module will not work (as if it is not installed) paired with such modules that use their own methods instead of PrestaShop methods. Prior to PrestaShop 1.7.8.0, these modules include all modules for filtering or displaying product lists on category pages, such as the standard module for filtering products "Layered navigation block" or "Faceted search", "Amazing filter" module. To make such modules work together, there is a solution, but it requires changing the code of these modules. Unfortunately, prior to PrestaShop 1.7.8.0, it is not possible to integrate these modules without changing the code. If you have PrestaShop version 1.7.8.0 or newer, then most of these modules will work without any changes in the code (no integration needed).
  • The module manual provides instructions with code examples so that you can integrate it with any module for any supported version of PrestaShop.

Installation

The module has a normal installation and uses PrestaShop class override system to override default behavior. Installation of the module is described in the manual.

Demonstration

Website demo for PrestaShop 1.7

How to check the module on the demo web-shop?

1. Follow the demonstration page. The page contains three products in the end of the product list:

  • The cup 1 w/o remains
  • The cup 2 w/o remains
  • The cup 3 w/o remains

2. Change the sorting option and make sure that products are still in the end of this list.

Data sheet

  • Compatible with versions of PrestaShop: 8, 1.7, 1.6, 1.5
  • Compatible with Thirty bees: yes
  • Compatible with versions of PHP: 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1
  • Requires ionCube extension for PHP: 10.3.9 or newer
  • Installation: normal
  • Uses PrestaShop classes override system: yes
  • Core modifications: no
  • Includes a documentation: yes
  • Includes free consultations: no
  • Translated into languages: EN, RU
  • Version: 2.2.0 (2024-04-17)
  • License: Proprietary license for closed-source software
  • Product type: Module
Yoann C. 04/27/2020 17:53:23

Great module and very good support! I recommend this module without any hesitation!
--
bureau-vallee.es

0
v0.8.0 (2014-05-05)
	+ the first release for PrestaShop 1.5 - 1.6
v0.8.1 (2014-10-20)
	+ fixed a problem that appeared when a catalog of products contains one or more products with 
	  ID equal zero.
v0.9 (2014-11-05)
	+ added new price sorting feature that allows to sort products with combinations properly when 
	  a base price of a product is zero
v1.0 (2015-02-22)
	+ sorting algorithm is improved
	+ some code improvements
v1.0.1 (2016-02-14)
	+ improved compatibility with PrestaShop 1.6
	+ removed a property that restricts the module installation on PrestaShop versions out of the 
	  predefined range
v1.0.2 (2016-11-18)
	+ removing classes cache file (class_index.php) after module has installed
v1.1.0 (2018-08-18)
	+ added support PrestaShop 1.7
	+ removed support PrestaShop 1.5
v1.3.0 (2019-04-13)
	+ the algorithm to get a product remains was improved taking in to account warehouses
	+ the fast algorithm to get products remains was developed (additional special cache enabled 
	  for 4 hours: acceleration up to several dozen times with several thousand products)
v1.5.0 (2019-06-28)
	+ added a button to reset the cache in the module settings (as well, the cache will be cleared 
	  when you click "Clear cache" in the "Performance" page)
	+ the algorithm to get a product remains was improved taking in to account each combination 
	  of a product
v1.6.0 (2020-02-18)
	+ added a setting to check whether the product option is "Available for sale", instead of 
	  checking stock quantities (the setting is useful, because sometimes selling of products are 
	  performing without taking into account of stock quantities)
v1.8.0 (2020-05-06)
	+ added support for older versions of PrestaShop 1.6 (below to 1.6.1.0) and again added support
	  for versions of PrestaShop 1.5 (previously it excluded in the module version of 1.1.0)
	+ caching of SQL queries for products in a category and in a supplier’s page was done (on these 
	  pages in PrestaShop they are not initially cached in any version)  
	+ in getProductsLite methods of overridden classes was added available_for_order column to a SQL
	  query, which was absent (it is needed for the "Available for sale" option to work)
	+ applied small new changes made in PrestaShop 1.7 to the overridden Search class
v1.8.1 (2020-06-12)
	+ fixed saving of an actual cache (saving was always done, even if the array of stock quantities 
	  was not changed)
v1.9.0 (2020-07-18)
	+ a library component of caching is involved, instead of its own implementation
v1.11.0 (2020-09-10)
	+ an improvement has been made so products without stock, but with the option "Allow orders",
	  are moved to the end of a list, but before products that are without stock and with the 
	  option "Deny orders"
	+ added a check for a presence of modules with which integration is required and a notice is made
	  with a corresponding information
	+ slightly changed the structure of the module and simplified the inclusion of the class autoloader
v1.12.0 (2020-11-06)
	+ added the integration with "Amazzing filter" module in overridden classes
v1.14.0 (2020-12-14)
	+ added support for all modes of processing a stock quantity of a pack (before that, packs were moved in the list correctly only in the case of the default setting when the stock quantity was setup directly  for a pack)
	+ added support for processing an input data array in the form of ProductLazyArray (modern modules are uses it)
	+ improved saving of stock quantities to the cache, taking into account a current shop identifier (along with this, multishop feature support is now complete)
	+ returned a product list limit for an Ajax request equal to ten
v1.15.0 (2021-05-28)
	+ improvement of the algorithm for working with packs of products
	+ fixed index check in an array with product data (led to an error when working with some listing modules)
	+ added a tooltip for an option in the modules settings
v1.16.0 (2021-09-01)
	+ updated dependencies and a client code
v1.17.0 (2022-08-05)
	+ added movement of products in a list of accessories
	+ updated dependencies
v2.0.0 (2023-05-29)
	+ implemented a new approach for integration with third-party product listing modules, therefore,
	  thanks to it, an integration with third-party modules will most often not be required, but starting 
	  from PrestaShop 1.7.8.0
	+ improved hints on the module settings page
	+ added support for Prestashop 8
	+ some improvements in the code
	+ updated dependencies
v2.2.0 (2024-04-17)
	+ added debugging of incorrect input data (if necessary, a programmer will receive a detailed report on the source of incorrect data)
	+ added clearing the cache of stock quantity when clicking on the cache clear button through "Administration / Performance" page 
	  (before this it only worked up to PrestaShop 1.7.1.0)
	+ added module compatibility check with PrestaShop version, which is run when installing the module
	+ removed restriction that PHP options must be disabled: "auto_prepend_file" and "auto_append_file"
	+ updated dependencies
You may use the demo of the module only on the "test" subdomain of any domain, for example: "test.sample.com". See other system requirements for the module in the "Data sheet" section of the description.