I would like to show the product data sheet in a modal popup. I intend to add the data sheet to the product image gallery, keep it hidden and then recall it in the popup.
Create the modal popup is not difficult, I need help only to display the image product.
To do this I created a new image attribute "datasheet", so I would like to use a similar code to show the attributes but in this case it will shows the datasheet image and that it can dynamically change for configurable products.
Can you help me?
<img class="col data datasheet" data-th="<?= $product->getResource()->getAttribute('datasheet')->getFrontend()->getValue($product); ?>" src="<?= $product->getResource()->getAttribute('datasheet')->getFrontend()->getValue($product)->getImageUrl(); ?>" />– Mohit Patel Apr 19 '20 at 12:19<img class="col data datasheet" data-th="<?= $_product->getResource()->getAttribute('datasheet')->getFrontend()->getValue($product); ?>" src="<?= $_product->getResource()->getAttribute('datasheet')->getFrontend()->getValue($product)->getImageUrl(); ?>" />– Mohit Patel Apr 19 '20 at 13:03