Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

category link to an external site


oscjww103

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 4 months later...

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!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...