Jump to:

2084 Posts in 1005 Topics by 453 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » SS-Shop: how to show all products in one page

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: 387 Views
  • suoko
    Avatar
    Community Member
    4 Posts

    SS-Shop: how to show all products in one page Link to this post

    Currently ss-shop is set to paginate 12 products per page.
    I'd like to add a button near "previous ... 1 ... 2 ... 3 .... next" that says "show all".
    I found the option "protected $limitItems = true" in the paginatedlist.php file.
    Is this the only viable way to do so ?

    I would also like to customize the number of shown products which is now 12.

    Thanks

  • thomas.paulson
    Avatar
    Community Member
    72 Posts

    Re: SS-Shop: how to show all products in one page Link to this post

    class ProductCategory extends Page {

       private static $page_length = 6;

    }

    you can hack the code, to update page_length and do database rebuld ie dev/build, but this is not ideal solution. when updating the module, we have edit the code again.

  • thomas.paulson
    Avatar
    Community Member
    72 Posts

    Re: SS-Shop: how to show all products in one page Link to this post

    Please ignore my last post,

    you can change the pagination limit by using the setter method

    // set pagination limit
    ProductCategory::config()->page_length = 6;

    Add the above code in mysite/_config.php

    reference
    http://doc.silverstripe.com/framework/en/topics/configuration

    Thanks

    387 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.