Answer the question
In order to leave comments, you need to log in
How to replace the "Offer" hl-block anchor with a regular picture?
Good day!
I'm trying to figure out the standard solution "Online store" of the small business edition.
Tell me, now, in order to display a picture of a trade offer, the property of binding to the highload block is used and the pictures are stored there,
but how can I display it directly through the picture property and not by binding to the highload block from the information block Trade offers?
I now use the property - MY_OFFERS
I want to replace the output of images in the product card with MORE_PHOTO
in local/templates/brather/components/bitrix/catalog.element/bootstrap_v4/result_modifier.php I
crop the image
foreach ($arResult['OFFERS'] as &$offer) {
$resized = CFile::ResizeImageGet(
$offer['PROPERTIES']['MORE_PHOTO']['VALUE'][0],
['width' => 75, 'height' => 75],
\BX_RESIZE_IMAGE_PROPORTIONAL,
false
);
$offer['PROPERTIES']['MORE_PHOTO']['SRC'] = $resized['src'];
unset($offer);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question