Adding Hyperlinks to External Sites to Side Boxes

Edit the code in whatever sidebox that you want to add the link to. Say you want to add a link to the 'Information' side box.

Edit the sidebox file information.php located in

/catalog/includes/boxes/

You will see the following code:

$info_box_contents[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a><br>');

If you want to make your new link be the first one in the 'Information' box, add this new line :

'<a href="http://aabox.com">AABox Web Hosting</a><br>' .

Directly before this line:

'<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .

So the final code block would look like this:

$info_box_contents[] = array('align' => 'left', 'text' => '<a href="http://aabox.com">AABox Web Hosting</a><br>' . '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a><br>');

Save it, then upload it back to the server. Load the main catalog page, and you will see your new link in Information side box, right at the top!

 
boxes_/adding_links_to_exernal_sites.txt · Last modified: 2008/01/29 23:01 by michael_s
Recent changes RSS feed