Why {{ recommendations.products_count }} returns 1 ? (product recommendations)

Solved

Why {{ recommendations.products_count }} returns 1 ? (product recommendations)

ced--ced
Shopify Partner
20 0 3

Why does the product recommendations return only 1 product whatever the number of products I have in the cart? And how can I modified this? Until now it was showing 4.

 

When I delete one product in the cart, and I have another left, the recommandation is replaced by another product. So I guess it's not like there is actually only 1 products lists in the recommandations data. So I should have had at least 2.

 

Thanks

Accepted Solution (1)

PageFly-Amelia
Shopify Partner
579 163 233

This is an accepted solution.

This is Amelia from PageFly - Landing Page Builder App


I think that you can look for the limit parameter in the API call and make sure it is set to the desired number of products (e.g., limit=4).

Here is an example of how you might adjust the limit parameter in your product-recommendations.liquid file:

<product-recommendations class="product-recommendations page-width" data-url="{{ routes.product_recommendations_url }}?section_id={{ section.id }}&product_id={{ product.id }}&limit=4">

Hope that my solution works for you.

Best regards,

Amelia | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

Replies 2 (2)

PageFly-Amelia
Shopify Partner
579 163 233

This is an accepted solution.

This is Amelia from PageFly - Landing Page Builder App


I think that you can look for the limit parameter in the API call and make sure it is set to the desired number of products (e.g., limit=4).

Here is an example of how you might adjust the limit parameter in your product-recommendations.liquid file:

<product-recommendations class="product-recommendations page-width" data-url="{{ routes.product_recommendations_url }}?section_id={{ section.id }}&product_id={{ product.id }}&limit=4">

Hope that my solution works for you.

Best regards,

Amelia | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.

ced--ced
Shopify Partner
20 0 3

It's exactly what I was looking for. Thanks Amelia!