Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

category link to an external site


oscjww103

Recommended Posts

Posted

does anyone know how to make a certain category link to an external site? i.e. its empty and has no products but just links externally

 

any help would be much appreciated

Posted

Edit your categories box and where the list is put together enter the following:

 

if ($counter == '123') {
 $categories_string .= 'http://foreigndomain.com" target="blank">';
 }
else{
  $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';
  }

 

Where 123 is the cPath of your category. You'll surely find the place where to add the code. Usually line 28.

Posted
Edit your categories box and where the list is put together enter the following:

 

if ($counter == '123') {
 $categories_string .= 'http://foreigndomain.com" target="blank">';
 }
else{
  $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';
  }

 

Where 123 is the cPath of your category. You'll surely find the place where to add the code. Usually line 28.

ok thanks. what about for the 'Main categories in front page'? or is there a way of changing the database entry so that a certain category always links to an external site wherever it is used?

  • 4 months later...
Posted

This works flawlessly on the main categories, however I'm trying to preform this task on a subcategory ie. the main category would be 30 and the subcategory would be 32 so the cPath = 30_32 would anyone be able to shed some light on this...thanks!

Archived

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

×
×
  • Create New...