I create new Block Xyaddons\Productzoom\Block\Product\View\Gallery
override Block \Magento\Catalog\Block\Product\View\Gallery
.
I want set template image.phtml
in Xyaddons_Productzoom::product/image.phtml
override template product/view/base-image.phtml
in core.
I try create function in block new Block. But i not success. so any help me? thank so much!
public function beforeToHtml(\Magento\Catalog\Block\Product\Gallery $originalBlock) {
$originalBlock->setTemplate('Xyaddons_Productzoom::produtc/image.phtml');
}