Skip to content

Error filtering template: Notice: Undefined variable: secureRenderer in /image_with_borders.phtml on line 88

hi i need fix my problem

Error filtering template: Notice: Undefined variable: secureRenderer in /home/user/public_html/app/design/frontend/Sm/themecore/Magento_Catalog/templates/product/image_with_borders.phtml on line 88

enter image description here

the line in 88

<?= /* @noEscape */$secureRenderer->renderTag('style', [], $styles, false) ?>

all code

<?php /**
  • Copyright © Magento, Inc. All rights reserved.
  • See COPYING.txt for license details.
    */
    ?>

getVar(‘product_image_white_borders’, ‘Magento_Catalog’);
$enableLazyLoadingWithoutBorders = (bool)$block->getVar(
‘enable_lazy_loading_for_images_without_borders’,
‘Magento_Catalog’
);
$width = (int)$block->getWidth();
$paddingBottom = $block->getRatio() * 100;
$_config = $this->helper(‘SmThemecoreHelperData’);
$enableLadyLoading = $_config->getAdvanced(‘lazyload_group/enable_ladyloading’);
$mediaSrc = $_config->getMediaUrl();
if ($enableLadyLoading) {
$imgClass = ‘lazyload’;
} else {
$imgClass = ”;
}
?>

<span class=”product-image-container product-image-container-getProductId() ?>” style=”width: “>

<img class=”escapeHtmlAttr($block->getClass()) ?> “

getCustomAttributes()): ?>

<?php foreach ($attributes as $name => $value): ?>
    <?= $escaper->escapeHtmlAttr($name) ?>="<?= $escaper->escapeHtmlAttr($value) ?>"
<?php endforeach; ?>
    <?php if ($enableLadyLoading) { ?>
        src="<?php echo $mediaSrc . 'lazyloading/blank.png'; ?>"
        data-src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>"
    <?php } else { ?>
        src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>"
    <?php } ?>

        loading="lazy"
        <?php if ($borders || $enableLazyLoadingWithoutBorders): ?>
            width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>"
            height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>"
        <?php else: ?>
            max-width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>"
            max-height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>"
        <?php endif; ?>
        alt="<?= $escaper->escapeHtmlAttr($block->getLabel()) ?>"/></span>

getProductId()} {
width: {$width}px;
}
*/
.product-image-container-{$block->getProductId()} span.product-image-wrapper {
padding-bottom: {$paddingBottom}%;
}
STYLE;
//In case a script was using “style” attributes of these elements
$script = getProductId()}”);
/**
for (var i = 0; i getProductId()} span.product-image-wrapper”
);
for (var i = 0; i ?>
renderTag(‘style’, [], $styles, false) ?>
renderTag(‘script’, [‘type’ => ‘text/javascript’], $script, false) ?>