Modify Default Sorting

Hi Guys,



Basically, I want to be able to use the default sorting where we can manually place products, but if the position is '0' then order by price. Does anyone know if this is possible and where in the code this could be edited?

Any idea on this?

If you use default sort, the products will be sorted as you want, only thing to modify in the number in the left, the order.

I know this, but I want a way of also sorting by price for some categories. Or, if I was to assign the same value to a product, they then sort by price. Does anyone know where the default sorting code is?

/core/fn.catalog.php

I've been scouring fn.catalog.php but can't find the snippet which defines how the default sorting actually works.



e.g. I have 4 products, 2 products are assigned position 1 and 2 products assigned position 2. The products that are both assigned position 1, how are they then sorted within that position?

In my 2.2.5 cart, I I'm sorting by price. CS-Cart does this in descending order by default, but I'd like to change it ascending. I have combed through the core/fn.catalog file, and I've seen a lot of sorting code. But, I'm not sure what I need to modify. Anyone know the line number or code snippet that I'd need to change?