I am doing the following to sort the product collection based on an attribute whose values are actually of type "String" but can only hold
1. I also mentioned default value as
$collection = $this->getCollection() ->addAttributeToSort('attr_name' *1, 'DESC');
In the above code, since the attribute type is "string", I added
*1 to convert the string type to Integer as mentioned in this post.
What should I do to sort the product collection based on a attribute which is of type string but has only values
PS: The collection is being sorted with other attribute in
__construct function already and then made to