![]() |
displaying products with higher productID first
Ok this is probably something i've overlooked.
But is there a way with products_t.php to display the items with a higher productID first ??? for example productID 234,235,236 will display before 127,126,125 ??? Reason being is that those with a higher productID will always be newer products so i would want those to be displayed first. |
Ok, here is a quick little mod that will do that for you. This will give you a checkbox in Admin (in Appearance Options, right under the Display Order dropdown) that will allow you to check if you want the listing in revere order or not, and it will also change the "Default" order method to ProductID.
Open products.php and look for the lines: Code:
if(!isset($sort)) Right under this add this code: Code:
{ Open /include/search.php and look for this block of code: Code:
# Sort the search results... and replace the line Code:
$sort_string = "$sql_tbl[products].product"; with Code:
$sort_string = "$sql_tbl[products].productid"; Run this SQL patch in the Patch/Upgrade section Code:
INSERT INTO `xcart_config` VALUES ('product_order_reversed', 'List products in reversed order', 'Y', 'Appearance', 100, 'checkbox', 'Y'); |
K thanks that worked a treat
|
Great!
|
Re: displaying products with higher productID first
I need something like this for 4.1.6. Anybody know of a way?
|
Re: displaying products with higher productID first
It works for me, but I have to change after following line:
case "title": |
All times are GMT -8. The time now is 01:23 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.