Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Products list


posword

Recommended Posts

Posted

I have a small catalog with just 17 items in 2 categories (http://peterwade.com/books/ .

 

I wonder how easier it would be to change the db_query in new_products.php to display all items in stock?

 

Can anyone help me on this, please.

 

Peter

-------------------------------------------------------------------

Online since 1995! -- the home

of inspiration and motivation for generic New Testament Christians.

New books by Peter Wade now available from Amazon and others --

Our new book, Bunches of Blessings: Poems by Vivien Wade.

Posted

Do you mean after the user logs in you want to display all of your products? Or do you want this table on your main page titled A Selection of Our Products to contain all of your products?

Posted

Thanks, rcmdesign.

 

I want it on the main page as soon as users goes to it. That is, much as it is displaying now but with all products displaying, preferably as thumbnails.

 

Cheers,

Peter

-------------------------------------------------------------------

Online since 1995! -- the home

of inspiration and motivation for generic New Testament Christians.

New books by Peter Wade now available from Amazon and others --

Our new book, Bunches of Blessings: Poems by Vivien Wade.

Posted

Edit the includes/modules/new_products.php file and look for the following:

 

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, 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 where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

 

and replace with

 

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, 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 where products_status = '1' order by p.products_date_added desc");

 

and also look for

 

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, 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_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' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

 

and replace with

 

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, 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_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' order by p.products_date_added desc");

Posted

Would it just be easy to set the dispal new products in admin to the amount you have available for example if you have total 17 items show 17 in admin, all the code changes seem a little overkill but will work.

Posted

He could just set this at a silly large number in admin then he wont have to do any thing at all ever with the code.

Archived

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

×
×
  • Create New...