Answer the question
In order to leave comments, you need to log in
How to display two prices in a block?
Hello. In coding, to be honest, I don’t understand, as well as in Bitrix itself, but there was a need to display two prices on a real estate selection site. One as the main price and one promotional. I can't figure out how to display both prices for display in the infoblock itself.
Please tell me the easiest way to do this and what to change.
At the moment, I looked through all the files associated with this block and directory, but all attempts to add were in vain.
Answer the question
In order to leave comments, you need to log in
kelFiz , hello. In general, judging by the parameters of the component that you showed in the screenshot, there are such parameters LIST_PROPERTY_PRICE and DETAIL_PROPERTY_PRICE - list / details, respectively (not standard parameters, added by the template developer). Without seeing the template code, I’ll point my finger at the sky that the developer decided to separate the property associated with the price from the rest in this way. And judging by the fact that a string and not an array was passed there, only one price is displayed in the template. For an experiment, you can replace the PRICE code in this parameter with your own SALE_PRICE and see if the output changes or not.
Add och. Simply, you just need to look at the template. in edit mode, do this
at the top in the window that opens, there is a path to the component template, here is its template.php and result_modifier.php you need to look
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question