Frontend Version Ordering issue


https://forum.kartris.com/Topic3809.aspx
Print Topic | Close Window

By metalmania - Tue 30 Jun 2015
I think I've spotted a small issue with ordering versions where the product is set to use the config defaults.

My Scenario:-
Product Settings
P_OrderVersionsBy = '-'
P_VersionsSortDirection = '-'

which means the sorting should come from the defaults:-
Config Settings
frontend.versions.display.sortdefault = 'V_OrderByValue'
frontend.versions.display.sortdirection = 'A'

However this does not produce the required result on the frontend.

I believe the problem is in the spKartrisVersions_GetByProductID stored procedure
because it is checking for an OrderDirection of null or empty before it will use the default config settings.
However in this case the value stored in the product row column (P_VersionsSortDirection) is '-'(Hyphen) - so the products get sorted by V_Price DESC (i.e. the ELSE statement in the procedure).

I guess the fix would be to check for null,empty OR '-' in the stored procedure before using the config defaults.
By shulemj - Mon 12 Sep 2016
I have the same issue, with the following setting:
frontend.versions.display.sortdefault = 'V_Name'