Dragonkeeper Posted October 5, 2006 Posted October 5, 2006 I have noticed, within a few other posting topics, that osc seems to default to display products in the same sort order as they were entered into the database. Can this be changed? I would like products to be displayed by Product Name order (as they are displayed that way as I am adding products into specific categories and I have tailored my Product Name to sort that way). Can this be done? Can the database be set up to reindex (or resort) by a selected field - specifically the Products_Name field? Any help would be immensely appreciated.
steve_s Posted October 5, 2006 Posted October 5, 2006 use order by clasue on product name at end of sql statement in catalog/includes/modules/new_products.php
paydaymom Posted October 5, 2006 Posted October 5, 2006 Is there a way to sort the products by price? I would like the higher priced items first....
desidil4ever Posted October 6, 2006 Posted October 6, 2006 order by products_price DESC or ASC whichever way you want them to show up....you could use the ORDER BY clause in ur admin/categories if you want to sort it as well Is there a way to sort the products by price? I would like the higher priced items first.... Simple Add-ons Please add simple plain tips here for others.
paydaymom Posted October 6, 2006 Posted October 6, 2006 order by products_price DESC or ASC whichever way you want them to show up....you could use the ORDER BY clause in ur admin/categories if you want to sort it as well I went to admin/categories.php and changed this line twice and could not get it to work. $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name"); I only change the last part to order by pd.products_price ASC, products_price ASC and p.products_price ASC and none of these worked. I am sorry I do not know php, any suggestions. Thanks
Dragonkeeper Posted October 6, 2006 Author Posted October 6, 2006 Thanks for the reply but are you sure that this will work in the Main Product listing section? I thought that the new_products.php file was used for the, er, New Products box. If I am incorrect, please let me know. I thought that perhaps the product_listing.php file would be the correct file to modify but I cannot find where to modify it. use order by clasue on product name at end of sql statement in catalog/includes/modules/new_products.php
steve_s Posted October 8, 2006 Posted October 8, 2006 catalog/includes/modules/new_products.php is what displays your new products on home page is not the new product box that would be in catalog/includes/boxs/ folder
Dragonkeeper Posted October 8, 2006 Author Posted October 8, 2006 Thanks. I got it. catalog/includes/modules/new_products.php is what displays your new products on home page is not the new product box that would be in catalog/includes/boxs/ folder
Recommended Posts
Archived
This topic is now archived and is closed to further replies.