-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5.26
-- Browser(s) name and version -- : Chrome 43.0.2357.134
Hello,
We were customizing the look and feel on how our search results displayed and we found that specific sorting options weren't functioning as expected. I took a deeper dive and looked at how hikashop's product search was implemented and found the following:
/plugins/search/hikashop_products/hikashop_products.php #59:
switch($ordering){
case 'alpha':
$order = 'a.product_name ASC';
break;
case 'newest':
$order = 'a.product_modified DESC';
break;
case 'oldest':
$order = 'a.product_created ASC';
break;
case 'popular':
$order = 'a.product_hit DESC';
break;
case 'category':
default:
$order = 'a.product_name DESC';
break;
}
There is a complete omission of logic to determine how products will be sorted by category. Was this an oversight? Is there an alternative?
This sorting strategy is very important to our client - a potential dealbreaker, in fact. I would implement via subclassing but this logic is buried in the 300-line onSearch method and doing anything in that would compromise our ability to apply updates. So from our end we're in a bind.
Can you possibly provide a hotfix?
Thanks,
Tony