K
K
kelFiz2020-01-28 01:33:22
1C-Bitrix
kelFiz, 2020-01-28 01:33:22

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.5e2f65298f2e2836509975.png5e2f653094ad8582068676.png
5e2f6ca845f29867820690.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PetrPo, 2020-01-28
@kelFiz

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
5e2fed339d936920831395.jpeg
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 question

Ask a Question

731 491 924 answers to any question