How to modify templates

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:

  1. Identify the HTML template file you want to override.
  2. Create a new directory structure in your custom theme to mirror the original template file's path.
  3. Copy the HTML template file from the parent theme or vendor directory to your custom theme directory.
  4. Modify the copied template file as needed.
  5. Clear the Magento cache to see the changes take effect.

See more details on Product Labels page

User Guide

How can we help you?

Didn’t you find the answer to your question? We are always happy to help you out.

© 2009-2024 Amasty. All Rights Reserved.