Magento Forum

   
Condition to Show Attribute Question
 
brendanb
Mentor
 
Total Posts:  1077
Joined:  2008-07-16
London, United Kingdom
 

Hi,

I have an attribute that at the moment is conditionally displayed when there is data in the field. Ive added a date field also, but i cant figure out how to make it also part of the condition

For example
IF attribuite_value not null and attribute_held_till <= today then show

Here is my code to only show when there is a value.

<?php if ($_product->getData('z_government_rebate_to')): ?>
                    
<h6 class="link-product-list-leadtime" >Rebate Available<?php echo nl2br($_product->getData('z_government_rebate_to')) ?></h6>
<?php endif; ?>

thanks
Brendan

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top