D
D
Dmitry Grabko2017-04-20 11:29:28
1C-Bitrix
Dmitry Grabko, 2017-04-20 11:29:28

How to change pennies in the cost of goods?

In the store, the product is displayed with kopecks:
d16d4c84c3ef4a10892fd68cf78142ba.png
How to change the display of kopecks in the component template? For example, change their size.
Price output code in the template:

<span itemprop="price"><?=$arResult["PRICES"]["розничная"]["VALUE"]?></span> <meta itemprop="priceCurrency" content="RUB">руб.</span>

As I understand it, the price is displayed entirely from the field, but there is no idea how to wrap pennies in a separate tag.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2017-04-20
@Dima_So

Maybe try explode?

<?$s = explode('.', $arResult["PRICES"]["розничная"]["VALUE"]);?>
<div style="font-size:50px"><?=$s[1];?></div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question