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

Hi,

I have successfully installed the product recommendations on product pages in the past, but this time it's not working as {{ recommendations.products_count }} returns 0. Yet there are multiple products listed in the shop and online.

I have followed this tutorial : https://help.shopify.com/en/themes/development/recommended-products/using-liquid

There are no errors in the console and the dom content is there but empty :

2OHMOK6Rhs.png

What could be the possible reasons behind that? I am a bit clueless right now.

 

Regards,

C'est simple comme bonjour ! Ou presque.
Need some help to customize your website? Message me anytime: 5euros.com/profil/maxdesign
0 Likes

Hi, I think the mechanism to calculate product recommendations from Shopify is based on your order and your product description. On a product page, they will display other products that frequently brought with the selected product. Let give it another try.

CRO Expert at PageFly - Advanced Shopify Page Builder.
- Get tips to personalize your page
- PageFly Page Builder: Website | Facebook | LinkedIn | Twitter | Group | Youtube.
- [Tutorial] Get more tips on using PageFly to soar sales this season

Thanks for your help Richard,

Actually I found the problem, which was documented in the "Recommendation logic". The problem is I only had one collection named "page d'accueil" (Home page) and apparently :

 

If the product doesn't have a collection URL, then the recommendation algorithm finds collections that include the product and pulls other products from those instead (excluding collections with handles “all” and “frontpage”)

So the "frontpage" handle was the issue. I created a new collection and populated the products in it and it works now.

Hope that helps anyone else in the future.

C'est simple comme bonjour ! Ou presque.
Need some help to customize your website? Message me anytime: 5euros.com/profil/maxdesign
0 Likes
N1ck
New Member
2 0 3

I tried adding another collection and populate it with the same items. It still didn't work for me. When I make a getJSON request I get an empty products array. However, this works on another website. Any ideas what could I have done wrong or missed out?

0 Likes