Jump to:

2084 Posts in 1005 Topics by 453 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Front end CheckBox sorting

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 2
Go to End
Author Topic: 1826 Views
  • Jedateach
    Forum Moderator
    227 Posts

    Re: Front end CheckBox sorting Link to this post

    To interact with the session you'll want to make use of the Session class:

    Here is some more of the example fleshed out.

    function savefilter($data,$form){

    function FilteredProducts(){
    $data = Session:get('productfilter');
    $savedfilter = "\"ParentID\" IN (".implode(",",$data["Categories"]).")"; //where $data["Categories"] is an array

    return $this->ProductsShowable($savedfilter);


    The limiting is done by passing the savedfilter to ProductsShowable, which makes sure the products it retrieves only belong to the given categories (Product Groups).

    This is far from complete, and you'd need to somehow get the ids of subcategories if you wanted to include products from those.

    I will be devoting some time to improving the ability to browse / search products in the future sometime.
    Here's a ticket I made: https://github.com/burnbright/silverstripe-shop/issues/36

  • ambient
    Community Member
    123 Posts

    Re: Front end CheckBox sorting Link to this post

    Hey Jeremy,

    Sorry I've been awol these last few weeks.

    I appreciate your help and hopefully the ecommerce module will get the upgrade sooner rather than later.

    The project I'm working on has unfortunately been shelved.

    Thanks again

Page: 1 2
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.