Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

include page only if category id = 1


Recommended Posts

Posted

Hi,

on the product info page, I want to include a file called test1.php i'm trying to include a business card designer script I have written.

But I need to only bring this page up if the current products category is = 1

 

Any ideas on how I could do this?

Posted

Something like below will do the trick, place the code in the product_info.php page where you want to display it:

 

		<?php
	if(isset($HTTP_GET_VARS['products_id']) && $HTTP_GET_VARS['products_id']!=''){
	$firstcats = explode("_",$cPath);
	if($firstcats[0]==1){
	require_once('test1.php');
	}//end if parent category id = 1
	}//end if product id
	?>

Archived

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

×
×
  • Create New...