Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is it possible to add a link to the categories box?


swiftmed

Recommended Posts

Hey guys & gals,

 

quick question, my client would like to add a link to the categories box basically linking to the special offers page. is this possible and if so, how would i do that please?

 

Thanks for your time.

Link to comment
Share on other sites

You could create a new box down the Categories with the link you want.

Just have to open the categories.php in the directory \includes\boxes and add the next code after the <!-- categories_eof //-->:

 

<!-- Offers //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => PUT HERE THE BOX NAME);

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => '<b><a href="http://www.THE LINK.com">THE NAME OF THE LINK</a><br>' .

'<a href="http://www.THE LINK2.com">THE 2ND LINK NAME</a><br></b>');

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- Offers_eof //-->

I think it could help you

Link to comment
Share on other sites

You could create a new box down the Categories with the link you want.

Just have to open the categories.php in the directory \includes\boxes and add the next code after the <!-- categories_eof //-->:

I think it could help you

 

Hi mate.

 

thanks soo much for your reply, and i would like to do that. i have done exactly as you have described an now the site is coming up with a

Parse error: syntax error, unexpected T_STRING, expecting ')' in /usr/home/rkmedia/public_html/blank-media/includes/boxes/categories.php on line 144

 

The line in question is

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

 

any ideas how i can get that working mate?

 

again, thanks a lot!

Link to comment
Share on other sites

Extrage, make sure that it doesn't run correctly, Y tried this code and it runs perfectly.

The error you see, says that there is an "unexpected T_STRING, expecting ')' " but the ')' is correct for closing the variable.

Make sure of the code and where you have placed it, may be there is an ')' more that must not be there.

If the error persist, ask me again.

Link to comment
Share on other sites

Extrage, make sure that it doesn't run correctly, Y tried this code and it runs perfectly.

The error you see, says that there is an "unexpected T_STRING, expecting ')' " but the ')' is correct for closing the variable.

Make sure of the code and where you have placed it, may be there is an ')' more that must not be there.

If the error persist, ask me again.

 

Hiya mate, again thanks for your reply. i had a look around but i simply do not no enough about this to be able to get it to work, is there anychance u could tell me exactly what i need to change or put there, or i pay you to sort it for me please?

Link to comment
Share on other sites

you don't need to add a box - that's way OTT. I've added links/buttons to the Specials at the the bottom of the category box countless times - it's easy stuff. In /includes/boxes/categories.php find this bit of code:

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

 

and right after that last closing curly bracket } add this:

 

if ($counter == 3) {

$categories_string .= '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">Specials</a>';

}

 

The $counter value should be changed to whatever the cPath value is of your last category.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...