Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change which products are displayed first


rickray76

Recommended Posts

When going to my web page, it shows the products that were entered last. I would like it to display the first products from the first listed category. Can anyone tell me how to do this?

 

Thanks,

 

Rick

Richard Ray

www.apollotechnology.net

Link to comment
Share on other sites

You can 'open' your store on one of your categories by doing the following.

 

Find out what the cPath is of the category you wish to open. This is in the address bar of the browser:

 

http://mysite.com/index.php?cPath=1 (for example)

 

Open /includes/application_top.php and find this bit of code (around line 445) and insert your cPath value into that last else {} statement. So change this:

 

// calculate category path

if (isset($HTTP_GET_VARS['cPath'])) {

$cPath = $HTTP_GET_VARS['cPath'];

} elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {

$cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);

} else {

$cPath = '';

}

 

to this:

 

// calculate category path

if (isset($HTTP_GET_VARS['cPath'])) {

$cPath = $HTTP_GET_VARS['cPath'];

} elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {

$cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);

} else {

$cPath = '1';

}

 

The Featured Products contribution would allow you to pick and choose what products were on display in your category sections.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...