Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

change front page listings catagory


Guest

Recommended Posts

Posted

hi how do i change the front page listings on my store. at the mo the store is opening with the whats new items but want it to be with specials. i have looked in indes.php and header.php but can not see what to change, can some one point me in the right direction please.

 

thanks

Posted

You could try using the same query from the page 'catalog/includes/boxes/specials.php'

Place it on page 'catalog/includes/modules/new_products.php'.

 

Comment out the following code on page 'catalog/includes/modules/new_products.php':

Note the /* and */

/*
 if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 } else {
$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 }
*/

 

Copy this underneath or above:

////////////////////////////////////// Insert BOF
 $new_products_query = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS); 
////////////////////////////////////// Insert EOF

 

If that does not work you will need to edit the query..

Lloyd

  • 2 weeks later...
Posted

Hi Thanks for the response will try that now sorry for delay in the replying, was on my hols, cheers!

Archived

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

×
×
  • Create New...