×
Login or create an account
If you have an account with us, please log in.

You have no items in your shopping cart.

Product Labels

Google Optimizer

or search frequently asked questions:

Custom calculated value

Sometimes you need to show not just attribute, but sum of attributes (like total length or new price)

You can customize Product Labels extension to meet your needs, It's quite easy.

Please open file app\code\local\Amasty\Label\Model\Label.php, find lines

case 'PRICE':
$value = strip_tags($store->convertPrice($this->_info['price'], true));
break;
and add lines like
case 'PRICE':
$value = strip_tags($store->convertPrice($this->_info['price'], true));
break;
case 'MY_NEW_VALUE':
$price2 = $p->getData('designtool_price');
$price3 = $this->_info['price'];
$value = strip_tags($store->convertPrice( $price2 + $price3, true));
break;


Then use {MY_NEW_VALUE} in admin

Rate the answer?
How to find CSS selector in Chrome browser

If you use Product Labels and have difficulties with finding CSS selector, please make the following easy steps:

 

1)  Hover the cursor over the image and right click mouse.

2)  Select Inspect.

3)  See the highlighted image code.

4)  Right click on the highlighted code.

5)  Select Copy > Copy selector.

Rate the answer?
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).
Rate the answer?
Back to top