Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Sort Order in ProductCategory list page


Go to End


1250 Views

Avatar
mhdesign

Community Member, 216 Posts

3 November 2014 at 12:30pm

Edited: 03/11/2014 12:30pm

Trying to get a list of Products in Silverstripe Shop to sort by Site Tree instead of alphabetically. Think I might be onto something here. In Product.php, line 75 and 76 I've found:
private static $default_parent = 'ProductCategory';
private static $default_sort = '"Title" ASC';
Commented these lines out and have a 'partial' sort happening (first two products of 11) Anybody know how to get it to sort right down the list -- by the order in the site tree?