Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Making the infobox name a link


mpiscopo

Recommended Posts

Posted

I want to make it so on info boxes such as "What's New?" (any info box with a right arrow), users can click on the "What's New?" text to go to that page. Default is that they need to click on the right arrow, it's small and not intuitive for my customers.

 

I think the change is somewhere in the boxes.php, but I can't quite figure it out. I see this reference for making the right arrow a link:

 

if ($right_arrow == true) {

$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';

} else {

$right_arrow = '';

}

 

I just can't seem to figure out how to apply it to the box title. Any help would be much appreciated.

 

Thanks,

Mark

Posted
I want to make it so on info boxes such as "What's New?" (any info box with a right arrow), users can click on the "What's New?" text to go to that page. Default is that they need to click on the right arrow, it's small and not intuitive for my customers.

 

I think the change is somewhere in the boxes.php, but I can't quite figure it out. I see this reference for making the right arrow a link:

 

if ($right_arrow == true) {

$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';

} else {

$right_arrow = '';

}

 

I just can't seem to figure out how to apply it to the box title. Any help would be much appreciated.

 

Thanks,

Mark

go to catalog/includes/boxes/whichever_box.php (reviews used here for example)

find this code

 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_REVIEWS);

near the top and change to this

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<a href="'. tep_href_link(FILENAME_REVIEWS) .'">' . BOX_HEADING_REVIEWS.'</a>');

 

that should do it!

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Posted

there is a contribution for this which basically is a 1 step thing

In *catalog*/includes/classes/boxes.php find this code:

 

class infoBoxHeading extends tableBox {

function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {

$this->table_cellpadding = '0';

And change it to this:

class infoBoxHeading extends tableBox {

function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {

$this->table_cellpadding = '0';

if ($right_arrow == true) $this->table_row_parameters = 'onclick="window.location=\''.$right_arrow.'\'"';

 

I want to make it so on info boxes such as "What's New?" (any info box with a right arrow), users can click on the "What's New?" text to go to that page. Default is that they need to click on the right arrow, it's small and not intuitive for my customers.

 

I think the change is somewhere in the boxes.php, but I can't quite figure it out. I see this reference for making the right arrow a link:

 

if ($right_arrow == true) {

$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';

} else {

$right_arrow = '';

}

 

I just can't seem to figure out how to apply it to the box title. Any help would be much appreciated.

 

Thanks,

Mark

Simple Add-ons Please add simple plain tips here for others.
Posted

Thanks for the two responses. The first worked better because the text shows more as a link (little hand designating for the mouse cursor when scrolling over). Just have to play with the style sheet to get the colors correct...

  • 11 months later...
Posted
go to catalog/includes/boxes/whichever_box.php (reviews used here for example)

find this code

 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_REVIEWS);

near the top and change to this

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<a href="'. tep_href_link(FILENAME_REVIEWS) .'">' . BOX_HEADING_REVIEWS.'</a>');

 

that should do it!

 

Thank you so much! This was very useful for me! :)

Archived

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

×
×
  • Create New...