Jump to content

Recommended Posts

Sort products in-stock first module for PrestaShop 1.5, 1.6, 1.7.

This module moves unavailable (out-of-stock) products to the end of product lists regardless of sorting. The module works on various pages and blocks where a list of products is displayed.

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 (out-of-stock). Thus, the module helps build customer loyalty.

The module will allow you to leave products visible for search bots and users until products temporarily unavailable or will no longer available (end of life). 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.

For more information see the module homepage.

I am selling this module on two marketplaces (homepages):

  1. Addons
  2. ModuleZ

Screenshots:

frontoffice1_en.thumb.png.f21033293334752e5c71d851b454ce73.png

 

frontoffice1_en.thumb.png.17511c38656907954818b93ba333354c.png

 

frontoffice2_en.png.184387ee4ab296a7473a391b0f744bf1.png

 

frontoffice3_en.png.61b56a14d392006ec2150f6f1c5ff401.png

 

backoffice2_en.thumb.jpg.c69f65b5d01a5661e8bf82349d6bcf83.jpg

 

backoffice1_en.thumb.png.c5d391bf020692e5eb0848e03a130b8b.png

Edited by zapalm
Updated the description. (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Hello Zapalm,

 

Very nice module, seems to be very useful.

Congrats with this new module.

 

Best regards,

 

ysco..

  • Haha 1

Share this post


Link to post
Share on other sites

Hello,

I have bought your module and I would like to make it work with Advanced Search 4. Is it possible ?

I have seen the instructions in the documentation about Layered navigation block module, but not about Advanced Search 4. 

Thank you & Regards

Axel Verger

Share this post


Link to post
Share on other sites

 

 

This is a brief instruction to make work InStockFirst module with other modules.

 

1 Find a file with the function in your module that generates products content like getProducts() or getProductsSearched() or getProductByFilters() or something else.

 

2 Find the main SQL-code in this function that querying products array (it should be the largest).

 

3 Then you need to remove a part of this SQL-code with 'LIMIT' instruction (pay attention to variables like $p and $n that are near of this instruction).

 

4 Then find where is placed the call of 'Tools::orderbyPrice($result, $orderWay);' function.

 

5 After this line you need to insert the line:

Instockfirst::moveOutOfStock($result, $p - 1, $n);

 

6 Make sure $result, $p and $n variables are have the same names that are used before in other queries or functions calls. Make also sure that the module InStockFirst is installed and enabled.

 

7 Save the file and check. That’s all.

Share this post


Link to post
Share on other sites

Always great support from the creator, module is working perfectly.

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)

Bought this module, and it does what is says.

Sorts products into Stock and No Stock but also it retains the sorting alphabetically of products.

Excellent help and advice.

Edited by gray (see edit history)
  • Thanks 1

Share this post


Link to post
Share on other sites

Hello, @LenM and @gray

Thanks for the feedback! 😀

On 3/5/2020 at 1:47 AM, gray said:

Sorts products into Stock and No Stock but also it retains the sorting alphabetically of products.

Clarification to readers: the module works regardless of the selected sort (of any type).

Share this post


Link to post
Share on other sites

I have updated the module for supporting PrestaShop 1.5 with new features as for PrestaShop 1.6-1.7. I have also updated the documentation and now it is more clear. The update is online now.

Reasons to moving unavailable products to the end of each list instead of hiding them. The module will allow you to leave products visible for search bots and users until products temporarily unavailable or will no longer available (end of life). 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.

Share this post


Link to post
Share on other sites

When installing the module we realized that Organize by price did not work, it was still loading, we told the developer about it and he solved it within 24 hours.  Best of all, it had nothing to do with his module and still solved it for us.  100% advisable, one of the best developers that I know in Prestashop :)

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More