Answer the question
In order to leave comments, you need to log in
How to write sorting by discount size for a component in Bitrix?
Good afternoon!
There was a task - there is an old price, there is a new price. The discount percentage is calculated.
I found an option - to create a property for a discount and update it by crown.
But is it possible to somehow sort products by the size of this discount without adding a property to the infoblock?
Answer the question
In order to leave comments, you need to log in
No, you can't - only by a precomputed property.
But it is better to update it not by the crown, but by the event. However, you can put an agent on the cron, which will perform a selective consistency check, and in case of its violation, launch a full check.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question