Searching ShopifyAPI::Product and pagination with shopify-kaminari

Highlighted
Shopify Partner
9 0 1

Gem info:

  • omniauth-shopify-oauth2 (1.2.0)
  • shopify-kaminari (1.1.0)
  • shopify_api (4.3.2 494b37a)
  • shopify_app (7.4.0)

Query:

parameters = {fields: 'id,title,url,handle', page: params[:page] || 1, limit: 5}parameters = parameters.merge(title: params[:title]) if params[:title].present?

@products = ShopifyAPI::Product.find(:all, params: parameters)

Issue:

When requesting WITH filter for title result doesn't include total_count.

Thus pagination(used shopify-kaminari) doesn't worked, doesn't show in view.

<%= paginate @items, :pagination_class => 'pagination-centered', params: {title: params[:title], page: params[:page] || 1} %>  
 
  •  
0 Likes
Highlighted
Shopify Staff
Shopify Staff
1040 140 165
0 Likes
Highlighted
Shopify Partner
9 0 1

@

0 Likes