Number of products shown per page (pagination)

1,259 views
Skip to first unread message

Fernando

unread,
Mar 27, 2011, 8:09:20 AM3/27/11
to Spree
Hi all,

When pagitation gets activated I start seeing 10 (4,4,2) products per
page rather than the 12 (4,4,4) that were displayed without
pagination.
For an example, see http://www.bestiaz.com/t/productos/nutricion . Is
this expected behavior? Is it possible to set the number of products
shown?

Thanks and cheers,
Fernando

Ewen

unread,
Mar 29, 2011, 5:47:06 AM3/29/11
to Spree
I believe you need to change the :products_per_page configuration from
10 to 12.
I have the following in spree_site.rb
Spree::Config.set(:products_per_page => 12)

Hope that helps,
Ewen

On Mar 27, 1:09 pm, Fernando <fer.izquie...@gmail.com> wrote:
> Hi all,
>
> When pagitation gets activated I start seeing 10 (4,4,2) products per
> page rather than the 12 (4,4,4) that were displayed without
> pagination.
> For an example, seehttp://www.bestiaz.com/t/productos/nutricion.  Is

mraaroncruz

unread,
Dec 21, 2012, 8:04:31 AM12/21/12
to spree...@googlegroups.com
You can now go into `config/initializers/spree.rb` and add this code (a little nicer)

Spree.config do |config|
  # Example:
  # Uncomment to override the default site name.
  # config.site_name = "Spree Demo Site"
  config.products_per_page = 100
end
Seems to be the way they want you to do it now.
Thanks Ewan,
aaron
Reply all
Reply to author
Forward
0 new messages