Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add web link into Categories


sh1977

Recommended Posts

Hi All

 

Can anyone help me with adding a web link in the category menu.

 

I want to add a link to Customer Computer Creator in the category menu.

 

Just wondering how to do it, or is there a contrib that allows you to add web links to the top or bottom of the menu.

 

 

Thanks

Scott

Link to comment
Share on other sites

nope.

 

for example the category menu could look like this

 

 

computers

hardware

projectors

 

i'd like to add a link at the top or bottom to another page ie ccc.php

 

so it would look something like this

 

Create a Customer Computer

---------------------------------

computers

hardware

projectors

 

 

Scott

Link to comment
Share on other sites

Hi

 

Thanks for your reply.

 

But i really would like the link to go inside the categories box.

 

I've seen a few oscommerce shops with the sort of links i'm after but i can't find anything to help me do it my self.

 

Scott

Link to comment
Share on other sites

Open catalog/include/boxes/catagories.php and at the bottom of the page look for

$info_box_contents[] = array('align' => 'center',

'text' => $categories_string);

 

 

 

to have the link before the links created by osc use

'text' => '<a href="<?php echo tep_href_link('ccc.php')?>">Link</a>' . $categories_string);

or to have it after use

'text' => $categories_string . '<a href="<?php echo tep_href_link('ccc.php')?>">Link</a>' );

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Hi Thanks for your reply

 

This is what i have in my categories.php file

 

$info_box_contents = array();

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

 

new infoBox($info_box_contents);

 

I changed it to

 

$info_box_contents = array();

$info_box_contents[] = array('text' => '<a href="<?php echo tep_href_link('ccc.php')?>">Link</a>' . $categories_string);

 

 

new infoBox($info_box_contents);

 

but i get the below error.

 

Parse error: parse error, expecting `')'' in D:\inetpub\shop\catalog\includes\boxes\categories.php on line 144

 

 

any idea's

 

 

Thanks

Scott

Link to comment
Share on other sites

Sorry, I made a mistake. That will teach me to post when I have been looking at code all day.

 

Change it to

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center',

'text' => '<a href="' . tep_href_link(ccc.php). '">Link</a>' . $categories_string );

 

ofcourse you can change the center to left or right

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

woops

'text' => '<a href="' . tep_href_link('ccc.php'). '">Link</a>' . $categories_string );

 

was missing the ' ' things around ccc.php

 

that should fix it :blush: sorry

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...