PDA

View Full Version : show catagory items


web9000
September 10th, 2003, 01:33 PM
i would like to show items in a particular category on is own page

what would be the code to show this?

example: we have closeout items and want them displayed on a special page with other info rather than a link to a regular category page

thanks

Jamie
September 10th, 2003, 03:06 PM
Hi,

I would suggest that you take a look at this post:

http://www.ldev.com/forums/showthread.php?t=93

Then, make a copy of your cart page, name it whatever you want, and put that code in it. Then, you can add the custom code you mentioned, and link to that page.

-Jamie

web9000
September 10th, 2003, 03:41 PM
i dont want this on my homepage

this is what i have in my index.php page

<?
if ($SESSION['show_home_page']) {
include "home.php";

}
include "$cart_isp_root/cart_content.php";

if ($include) include $include;

?>

and i use include pages with a link like this

<a href="index.php?include=contact.php">

i want to make a page to display closeout items and simply show the product list from that category and place it in a table so i can format the page with other elements

is this possible?

Jamie
September 10th, 2003, 04:56 PM
Hi,

Yes, this is possible. The main reason I mentioned you should copy your index page is so that you get the include at the top. Because you want to do it dynamically like your other links, make a link like this:

<a href="index.php?include=closeouts.php">closeouts</a>

BTW - Please read this post: http://www.ldev.com/forums/showthread.php?t=224
The way you are including your files can potentially be a security hazard. You may want to change your method.

After you have successfully made a link to include your closeouts page, put this code in that file to display the category you mentioned:


show_products("cat_click","","Category = 45 AND Not_For_Sale <> 1");


Then, just change the "45" to the record number of your category.

Thanks,
Jamie

web9000
September 10th, 2003, 07:08 PM
that didnt work either

im giving up

sorry to waste your time