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

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

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

1 Like

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