D
D
dimonfreeman2020-01-13 17:27:41
1C-Bitrix
dimonfreeman, 2020-01-13 17:27:41

How to display goods with a "shortcode" bitrix?

Hello everyone ,
in result_modifer
I write
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
$arResult["DETAIL_TEXT"] = preg_replace(
"/#PRODUCT_ID_([\d]+)#/is",
'ZAMENA',
$arResult["DETAIL_TEXT"]
);
?>
you need #PRODUCT_ID_23# to display
product 23
if somewhere else #PRODUCT_ID_64#
output another product with id 64.
The word ZAMENA works, but how to get the goods there and display them in the right place.
I would be grateful for advice.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question