I have created a custom dropdown attribute name "manufactures_guarantee_length", and its value like 1_year_guaranty,2_year_guaranty,3_year_guaranty, more, in the product details page, I call that attribute, now when we change the attribute value in any product that kind of image should change at the front-end product detail page,
for that, I have created a layout file catalog_product_view.xml and guaranty.phtml file, in phtml file, I code like
<?php $product = $block->getProduct(); ?> <?php echo $product->getData('manufactures_guarantee_length'); ?>
so I get the value of dropdown, so now how to change like Image as per dropdown? please suggest me on this. Thanks in advance. .