Thanks for the clarification.
This is easy to tweak.
In /pc/showfeatured.asp, find:
Case "0": querySort = " ORDER BY pcprod_OrdInHome asc"
|
replace that with the following:
'Modified to sort by date entered by default: 'Case "0": querySort = " ORDER BY pcprod_OrdInHome asc" Case "0": querySort = " ORDER BY pcprod_OrdInHome ASC, products.pcprod_EnteredOn DESC"
|
Then find:
query="SELECT distinct products.idProduct, products.sku, products.description, products.price, products.listHidden, products.listPrice, products.serviceSpec, products.bToBPrice, products.smallImageUrl, products.noprices, products.stock, products.noStock, products.pcprod_HideBTOPrice, products.pcprod_OrdInHome, products.formQuantity, products.pcProd_BackOrder FROM products, categories_products, categories WHERE products.active=-1 AND products.showInHome=-1 AND products.configOnly=0 AND products.removed=0 " & queryNFS & " AND categories_products.idProduct=products.idProduct AND categories.idCategory=categories_products.idCategory AND categories.iBTOhide=0 " & query1 & querySort
|
Replace that with the following:
'Modified to include to include products.pcprod_EnteredOn: 'query="SELECT distinct products.idProduct, products.sku, products.description, products.price, products.listHidden, products.listPrice, products.serviceSpec, products.bToBPrice, products.smallImageUrl, products.noprices, products.stock, products.noStock, products.pcprod_HideBTOPrice, products.pcprod_OrdInHome, products.formQuantity, products.pcProd_BackOrder FROM products, categories_products, categories WHERE products.active=-1 AND products.showInHome=-1 AND products.configOnly=0 AND products.removed=0 " & queryNFS & " AND categories_products.idProduct=products.idProduct AND categories.idCategory=categories_products.idCategory AND categories.iBTOhide=0 " & query1 & querySort query="SELECT distinct products.idProduct, products.sku, products.description, products.price, products.listHidden, products.listPrice, products.serviceSpec, products.bToBPrice, products.smallImageUrl, products.noprices, products.stock, products.noStock, products.pcprod_HideBTOPrice, products.pcprod_OrdInHome, products.formQuantity, products.pcProd_BackOrder, products.pcprod_EnteredOn FROM products, categories_products, categories WHERE products.active=-1 AND products.showInHome=-1 AND products.configOnly=0 AND products.removed=0 " & queryNFS & " AND categories_products.idProduct=products.idProduct AND categories.idCategory=categories_products.idCategory AND categories.iBTOhide=0 " & query1 & querySort
|
If you actually assign sort order values to your featured products in the Control Panel, those will trump with this query. If you don't, then everything will be ordered by the date added to the database.
You can therefore have the best of both by using the ordering option in the CP if you want to pop certain products to the top, else everything will be ordered by date entered from most recent to oldest.
|