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

Setting ecommerce to order by site tree


Go to End


2 Posts   1677 Views

Avatar
Optic Blaze

Community Member, 190 Posts

17 April 2013 at 2:06am

Hi there, i am using the ecommerce module from Sunnyside up.

I need to be able to have my products sorted by their site tree sort order by default. I have tried making changes to thge YAML and running dev build, but it does not seem to affect the default sort on the site.

This is what the YAML file looks like at the moment, but it does not change the s

ProductGroup:
sort_options:
default:
Title: 'Default Order'
SQL: "\"FullSiteTreeSort\" ASC, \"Sort\" ASC"

Thanks

Avatar
Optic Blaze

Community Member, 190 Posts

17 April 2013 at 2:59am

Ok got it to almost work... i changed the following in the YAML file:

----------------------------
ProductGroup:
sort_options:
default:
Title: 'Default Order'
SQL: "\"FullSiteTreeSort\" ASC"
-----------------------------

Only problem is that if there are more than 10 products loaded in a subcategory, then the sorting goes wonky. It almost looks like the syste resorts items that are more than ten....so if the sort order is supposed to be 1,2,3,4.....10 it will actually sort it as 10,1,2,3,4...9

Any ideas how to fix this?

Thanks