Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HELP!! Can I have multiple product info pages?


reefadt

Recommended Posts

HELP!

 

My company has a fixed list of members, and to display bios of all 250 members, I simpley set "membership" as one of my categories, and then formatted product_info.php to properly display their bio infomation.

 

I also have an art collection of over 1,000 pieces that I would like to display, so I created a category called "art collection". BUT, the layout of the display for the artwork needs to be different from the layout for the bios.

 

How do i do this? has anyone done something similar? Do I make one category use a certain product_info.php and then another category use another product_info.php? How do i do this?

 

HELP!!

Link to comment
Share on other sites

I did do one using multiple featured products pages and the category link was seperate for each page this allowed each so called featured page to have a different layout and the admin could control what was to be shown where

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

  • 4 months later...

To show a different product_info page based on the category the product was located in, I added the following to the top of product_info.php:

 

    $category_query = tep_db_query("select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '$products_id'");
      $category = tep_db_fetch_array($category_query);
      $catid=$category['categories_id'];

 

then comment out what OSC normally displays and redefine it below:

 

//////////////////////////////////////////////////////
//proper display for products in category 40
//////////////////////////////////////////////////////

if ($catid === '40')
{
             echo "define display for cat 40 here";
}
//////////////////////////////////////////////////////
//proper display for products in category 44
//////////////////////////////////////////////////////

if ($catid === '44')
{
             echo "define display for cat 44 here";
}

 

Or if you need to create separate product_info pages for each category, you could redirect to the appropriate product_info template page by using:

 

if ($catid == '40')
{
             include('product_info40.php');
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...