S
S
sergeyviktorovich2021-01-19 20:14:43
1C-Bitrix
sergeyviktorovich, 2021-01-19 20:14:43

How to display products that are not in stock at the end of the bitrix catalog?

I want to display the goods sorted by price, but those that are not in stock at the end, I tried using CATALOG_QUANTITY, but apparently the quantity is taken into account, but I need it by availability

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton, 2021-01-19
@anton99zel

If you put down a property along with zero availability, for example NOSKLAD, then you can sort by
availability If there are no products, they are displayed at the end.

$arSort = array("PROPERTY_NOSKLAD"=>"ASC", "PROPERTY_PRIORITET"=>"DESC", "shows"=>"DESC");

In general, it is configured like this

A
Alexey Emelyanov, 2021-01-19
@babarun

In the catalog component settings, make the first sort direction by CATALOG_AVAILABLE

CATALOG_AVAILABLE - product availability indicator (Y|N). A product is considered unavailable if its quantity is less than or equal to zero, quantitative accounting is enabled and purchase is prohibited at zero quantity

! quantity accounting must be enabled and purchases with zero quantity must be prohibited

A
Alexander, 2021-01-20
@kikher

And in the settings just turn on "Inaccessible products: Display at the end" does not help?
https://yadi.sk/i/gjL-oTfBCK33Rg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question