S
S
serik2020-10-03 18:06:33
1C-Bitrix
serik, 2020-10-03 18:06:33

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
5f78963f2cdfb756120746.png
5f789646a3745024317542.png

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);
}


and in the template.php template
, I can’t figure out how to correctly replace the code with my own because of SKU_PROPS.
Because after replacing the code with your own, the pictures seem to be displayed, but the prices do not change when you click.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PetrPo, 2020-10-04
@black_xe

Helped me understand the comments.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question