<?
$arAvailableSort = array(
"name" => Array("name", "asc"),
//"price" => Array('catalog_PRICE_'.$arResult['_PRICE_ID'], "asc"),
"price" => Array('PROPERTY_MINIMUM_PRICE', "asc"),
);
$sort = array_key_exists("sort", $_REQUEST) && array_key_exists(ToLower($_REQUEST["sort"]), $arAvailableSort) ? $arAvailableSort[ToLower($_REQUEST["sort"])][0] : "name";
$sort_order = array_key_exists("order", $_REQUEST) && in_array(ToLower($_REQUEST["order"]), Array("asc")) ? ToLower($_REQUEST["order"]) : $arAvailableSort[$sort][1];
?>
|