I add three text field attribute in my product view.phtml, but i want to hide one text above only if none of that attributes have value.
This is my work but, "PURCHASE FROM THESE RETAILERS" is still in page, if i remove all attributes value in admin from (amazon_com_link, amazon_com_link, amazon_ca_link).
<?php if(in_array($_product->getAmazon_com_link) && ($_product->getAmazon_co_uk_link) && ($_product->getAmazon_ca_link) ) ?>
<a style="font-size:20px;letter-spacing: normal;font-style: italic;font-weight: bolder;color: #fda221;"> PURCHASE FROM THESE RETAILERS
</a>
<div class="buy-from">
<?php if($_product->getAmazon_com_link()): ?>
<a href="<?php echo ($_product->getAmazon_com_link()) ?>"><img src="<?php $this->getSkinUrl(); ?>/amazonus-logo.jpg" alt="Buy from Amazon.com"></a>
<?php endif ?>
<?php if($_product->getAmazon_com_link()): ?>
<a href="<?php echo ($_product->getAmazon_co_uk_link()) ?>">
<img src="<?php $this->getSkinUrl(); ?>/amazonuk-logo.jpg" alt="Buy from Amazon.co.uk">
</a>
<?php endif ?>
<?php if($_product->getAmazon_ca_link()): ?>
<a href="<?php echo ($_product->getAmazon_ca_link()) ?>">
<img src="<?php $this->getSkinUrl(); ?>/amazonca-logo.jpg" alt="Buy from Amazon.ca">
</a>
</div>
<?php endif ?>
I want to show off text inside <a></a>
if none of that three attributes have values.