Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Links in box headings


vertmonkee

Recommended Posts

First off sorry for such a simple question, i know this can be done as i have seen it suggested but i have searched the forums and still can't find how to do it.

 

I have my new products module box on the index.php, also a best sellers and specials in similar boxes.

 

I would like the headings in each of these to link to other pages.

 

Please can somone enlighten me.

 

Thanks

Link to comment
Share on other sites

  $info_box_contents = array();
$info_box_contents[] = array('text' =>  '<div class="main"><b>' . BOX_TELL_A_FRIEND_TEXT . '</b></div>');

new infoBox($info_box_contents, false, false);

 

You should find something similiar to the code above in w/e box you are trying to modify. I am useing the box tell_a_friend.php as this example.

 

Then just do this:

 

  $info_box_contents = array();
$info_box_contents[] = array('text' =>  '<div class="main"><a href="link.php"><b>' . BOX_TELL_A_FRIEND_TEXT . '</b></a></div>');

new infoBox($info_box_contents, false, false);

 

See how I wrapped the "BOX_TELL_A_FRIEND_TEXT" in a link? Thats all you need to do to which ever box/header.

 

-Dennis

Link to comment
Share on other sites

Thanks Dennis,

 

I see what you have done and it has worked for the info boxes in my column left and right.

 

I tried to do the same to the new products module. In catalog/includes/modules/new_products.php I found these lines

 

$info_box_contents = array();

$info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 

I changed them to this

 

$info_box_contents = array();

$info_box_contents[] = array('text' => '<div class="main"><b>' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . '</b></div>');

 

But it does not create a link.

 

What am I missing,

 

Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...