I am trying to provide the custom attribute in sort-by, when am trying to fetching the products list order by custom attribute those are not in Ascending order.
if ($attribute == 'paidship') {
//$dir = 'ASC';
if (isset($this->_joinFields[$attribute])) {
$this->getSelect()->order($this->_getAttributeFieldName($attribute) . ' ' . $dir,'e.name'.$dir);
}
}
My custom attribute is "paidship", i want fetch them in first in Ascending order and remaining products should display after those products and those are also be in Ascending order