You are here:  » replacing link text with image

Support Forum



replacing link text with image

Submitted by Diana on Sat, 2008-07-12 02:50 in

Hi.

I would like to replace the "visit store" text with an "ORDER" button image.
I currently have:

<?php foreach($product["products"] as $priceProduct): ?>
              <?php if ($priceProduct["price"] == $mainProduct["price"]): ?>
                <a href='<?php print tapestry_buyURL($priceProduct); ?>' <img width='35' src='/picts/order.gif' /></a><br />
              <?php else: ?>
              <?php break; ?>
              <?php endif; ?>
              <?php endforeach; ?>

It looks fine in Mozilla browser, but the image does not show up in Internet Explorer.
Any solutions?
Thanks, Diana

Submitted by support on Sat, 2008-07-12 05:44

Hi Diana,

There is a small typo in the code which is probably causing this - the opening A tag is missing the closing ">" character; try this:

<a href='<?php print tapestry_buyURL($priceProduct); ?>'><img width='35' src='/picts/order.gif' /></a><br />

Cheers,
David.

Submitted by Diana on Sat, 2008-07-12 20:14

Thanks David, I probably would never have figured that out. Works great now.
Diana