If you have no idea how to modify templates of Product Labels Magento extension, please follow the instructions below.
1) Open file app/design/frontend/Your_Theme_Package/Your_Theme/template/catalog/product/list.phtml
------- Find the first instance product image code:
<?php // Product Image ?>
<a href .......</a>
---- and wrap it with our code as done below:
<div class="amlabel-div">
<?php echo Mage::helper('amlabel')->getLabels($_product) ?>
<?php // Product Image ?>
<a href .......</a>
</div>
------- Then find the second instance product image code:
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>".....</a>
---- and also wrap it.
2) Open file app/design/frontend/Your_Theme_Package/Your_Theme/template/catalog/product/view/media.phtml
------- Find product image code:
<p class="product-image product-image-zoom">....</p>
---- and wrap it with our code as done below:
<div class="amlabel-div">
<?php echo Mage::helper('amlabel')->getLabels($_product, 'product') ?>
<p class="product-image product-image-zoom">.....</p>
</div>
3) Log in as admin and refresh all caches (System > Cache Management).
How can I override an HTML template in Magento 2?
To override an HTML template in Magento 2, follow these steps:
- Identify the HTML template file you want to override.
- Create a new directory structure in your custom theme to mirror the original template file's path.
- Copy the HTML template file from the parent theme or vendor directory to your custom theme directory.
- Modify the copied template file as needed.
- Clear the Magento cache to see the changes take effect.
Login and Registration Form