V
V
Vladimir2018-10-23 11:43:27
1C-Bitrix
Vladimir, 2018-10-23 11:43:27

How to get $arResult without including a template?

Hello.
Began to create a server API for the mobile application of the online store. The site has already implemented the output of the necessary data for products (price, offers, discounts), so I want, to save time, in response to a request, connect a component with the necessary settings and send a ready-made $arResult data array without connecting a template. I tried to write in "result_modifer":
"$APPLICATION->RestartBuffer();
return $arResult;
die();"
But, the template is still connected.
What is the best way to solve this problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
eternalfire, 2018-10-23
@lycifep

it's better to write like this - https://github.com/ArtamonovDenis/artamonov.api/wiki
specifically your question is that in the component file (compnent.php) return $arResult, that is, instead of
write
return $arResult

J
Jupiter Max, 2018-10-23
@vardoLP

not that ? a little lower in the description

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question