Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hyperlink an Image in a box?


Guest

Recommended Posts

I've got the credit card image box contrib and want to add a hyperlink to the image as in "<a href= blah blah blah" etc. .. tried putting "<? and ?>" around it .. no good .. new to php .. haven't a clue !

 

Heres the box code with the image .. any ideas?

 

Thanx :'(

 

//Credit Card Box

 

 

<?php

?>

<!-- credit card box //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => 'We Accept'

);

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center',

'text' => tep_image(DIR_WS_IMAGES . 'credit-cards-square.gif') );

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- credit card_eof //-->

Link to comment
Share on other sites

Change

'text' => tep_image(DIR_WS_IMAGES . 'credit-cards-square.gif') );

 

to

'text' =>'<a href="www.myurl.com">' .  tep_image(DIR_WS_IMAGES . 'credit-cards-square.gif') . '</a>' );

 

I think it should do what you want

Link to comment
Share on other sites

Change

'text' => tep_image(DIR_WS_IMAGES . 'credit-cards-square.gif') );

 

to

'text' =>'<a href="www.myurl.com">' .  tep_image(DIR_WS_IMAGES . 'credit-cards-square.gif') . '</a>' );

 

I think it should do what you want

 

 

Thanx Enigma .. worked a treat!

 

B)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...