bigbob2 Posted June 23, 2010 Posted June 23, 2010 Hi, I am stuck on a line of code that I am trying to add to one of my info boxes. I want to add an imgge that will open up a page (not off my site). This is what I have so far, but it tries to link to http://www.google.com'>http://www.mysite.com/http://www.google.com rather than http://www.google.com Can someone please tell me where I have gone worng and correct this line of code: $info_box_contents[] = array('align' => 'center','text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents">' . '<a href="' . tep_href_link('http://www.google.com') . '">' . tep_image(DIR_WS_IMAGES . 'google.gif') . '</a></td></tr></table>'); Thanks Kev
germ Posted June 23, 2010 Posted June 23, 2010 <a href="' . tep_href_link('http://www.google.com') . '"> Needs to be: <a href="http://www.google.com"> tep_href_link can only link to pages WITHIN your store. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
bigbob2 Posted June 23, 2010 Author Posted June 23, 2010 <a href="' . tep_href_link('http://www.google.com') . '"> Needs to be: <a href="http://www.google.com"> tep_href_link can only link to pages WITHIN your store. Thank you for the info, but when I replaced that section with your code, it stops the info boxes from loading, they just come up with an error?
germ Posted June 24, 2010 Posted June 24, 2010 That would mean you didn't change it correctly. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
bigbob2 Posted June 24, 2010 Author Posted June 24, 2010 Thank you for the info, but when I replaced that section with your code, it stops the info boxes from loading, they just come up with an error? Sorry, my mistake I must have made an error. I just tried again and it worked perfectly. Thank you heps for your help.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.