T
T
timers2018-02-06 18:44:47
HTML
timers, 2018-02-06 18:44:47

How to display text when a product is available in Bitrix?

Hi everybody.
Such a question on Bitrix: I need to make certain text displayed in the detailed view of the product if the product is available (or, for example, if there is a "Add to cart" button, the text is displayed) and also a specific text is needed in the return if the product is not available.
How to implement it in a template?
All that was found, but it's stupid for directories.

<?if ($APPLICATION->GetCurDir() == "/catalog/") {?>
<!-- ваш код -->
<?}?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Filippenko, 2018-02-06
@timers

In the catalog.section and catalog.element components, if you display the $arResult array, there will be CATALOG_AVALIABLE and CATALOG_QUANTITY keys. Build a condition on them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question