View Single Post
  #2  
Old January 21st, 2015, 11:22 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

I think this will work though you might have to tweak the value 250...

In your Product Details view, change this:

HTML Code:
    <?php if ($product->saleprice > 0 &&  $product->saleprice < $product->price) : ?>
 <div>
   <a class="fancybox" href="#test">Coupons</a>

    <div id="test" style="display:none;width:800px;">
       <div id="view">
        <?php echo datafeedr_tag('Coupons?merchant='.$product->merchant.'&c=1456737'); ?>
       </div>
    </div>
 </div>
    <?php endif; ?>
To this:

HTML Code:
<?php $coupons = datafeedr_tag('Coupons?merchant='.$product->merchant.'&c=1456737'); ?>
<?php if ( strlen( $coupons ) > 250 ) : ?>
	<div>
		<a class="fancybox" href="#test">Coupons</a>
		<div id="test" style="display:none;width:800px;">
			<div id="view">
				<?php echo $coupons; ?>
			</div>
		</div>
	</div>
<?php endif; ?>
Hopefully that gets you there!

Eric