Jump to:

2076 Posts in 857 Topics by 449 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Setting ecommerce to order by site tree

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, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 496 Views
  • Optic Blaze
    Avatar
    Community Member
    153 Posts

    Setting ecommerce to order by site tree Link to this post

    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

  • Optic Blaze
    Avatar
    Community Member
    153 Posts

    Re: Setting ecommerce to order by site tree Link to this post

    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

    496 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.