- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
$sortBy = "";
if ( isset($_REQUEST['sortBy']) && ! empty($_REQUEST['sortBy'])) {
// Get sort direction and field sort.
$sortByParts = explode("-", $_REQUEST['sortBy']);
if ( is_array($sortByParts) && ! empty($sortByParts[0]) && ! empty($sortByParts[1])) {
$sortBy = $sortByParts[0];
$direction = $sortByParts[1];
}
}
switch ($sortBy)
case "discount":
$sortFieldBy = $sortBy;
break;
case "created":
$sortFieldBy = $sortBy;
break;
case "vendor":
$sortFieldBy = $sortBy;
break;
case "actual_euprice":
$sortFieldBy = $sortBy;
break;
case "actual_euprice":
$sortFieldBy = $sortBy;
break;
case "top_sell_product":
default:
$search->addAdditionalJoins(
"top_sell_product",
array("top_sell_product.prodlevid" => "p.prodlevid"),
SEARCH_ADDITIONAL_JOIN_TYPE_INNER,
array()
);
Lure Of Chaos 19.03.2012 00:22 # +6